as some of you might already have noticed (from previous questions) I am new to Vaadin. Therefore I have another (very simple question). Its about the paths and ResourceBundles / i18n.
Where is the best place for the .properties files for the ResourceBundle to put in?
Currently I have the files stored in the default package (src/java/messages_en.properties) and I call
From my understanding it is better to place the .properties files into a sub folder of WEB-INF (i.e. WEB-INF/i18n/messages_en.properties). But I do not know how to call them from there.
I’m not sure that I agree that it is better to place the .properties files into WEB-INF; ResourceBundle.getBundle will use the classpath to find the properties files - and WEB-INF/i18n is not on the classpath.
Don’t get me wrong - it is probably possible - but I would suggest it’s best left on the classpath as in your original example, unless there is a concrete reason to do otherwise.
No, I do not have a concrete reason. I just wasn’t sure if it is the right way in Vaadin to place the .properties files in the classpath. The themes files have their own directory under the WebContent directory. So I thought .properties files should be placed outside the classpath as well.