-
1. Re: Load Resource Bundle
knuwu Apr 4, 2007 10:17 AM (in response to jbossja)Hi jbossja
Do you have a file messages_fr.properties in the directory /resources? -
2. Re: Load Resource Bundle
knuwu Apr 4, 2007 10:31 AM (in response to jbossja)I typically load Resources like this in my bean class:
ResourceBundle.instance().getString(this.label);
Attention: ResourceBundle is of type org.jboss.seam.core.ResourceBundle! -
3. Re: Load Resource Bundle
jbossja Apr 5, 2007 1:30 AM (in response to jbossja)Hi knuwu,
Yes I do have a messages_fr.properties in my WEB-INF/classes directory.
I can access the properties file in my jsf pages via <f:loadBundle basename="messages" var="msg"/>.
The problem is when I'm loading the Resource Bundle in my bean class to populate a drop down list with values that are locale-sensitive.
I have tried what you suggested but it's not working.
In my components.xml file I have this:<component name="resourceBundle"> <property name="bundleName">messages</property> </component>
Any ideas about what can be done? -
4. Re: Load Resource Bundle
jbossja Apr 11, 2007 2:52 AM (in response to jbossja)Hi all,
Can anybody help me with this issue plz?[/img] -
5. Re: Load Resource Bundle
pmuir Apr 11, 2007 9:54 AM (in response to jbossja)resourceBundle.getBundle is a static method on java.util.ResourceBundle. Make sure you have set LocaleSelector.instance().locale to your desired locale and the access it with resourceBundle.getString()