[jboss-user] [JBoss Seam] - SEAM internationalization problem :(
alex_enache
do-not-reply at jboss.com
Tue Aug 28 03:27:33 EDT 2007
Hi guys,
I'm having a problem with internationalization in SEAM for 2 days now. And I can't seem to make it right. So, I have the following files:
pmResources_ro.properties
pmResources_en.properties
pmResources_fr.properties
pmResources.properties
They are stored in:
/myapp.ear/myapp.war/WEB-INF/classes/
Here is what faces-config.xml contains about the bundle:
<application>
| <message-bundle>pmResources</message-bundle>
| <locale-config>
| <default-locale>ro</default-locale>
| <supported-locale>ro</supported-locale>
| <supported-locale>en</supported-locale>
| <supported-locale>fr</supported-locale>
| </locale-config>
| </application>
The components.xml part:
<core:resource-bundle>
| <core:bundle-names>
| <value>pmResources</value>
| </core:bundle-names>
| </core:resource-bundle>
And in my page I use it with:
...
| <f:loadBundle basename="pmResources" var="bundle"/>
| ...
| <h:outputText value="Text=#{bundle.AboutUsText}"/>
Even though ro should be default, every time I load the page en is the one displayed. And I tried to use:
<h:selectOneMenu value="#{localeSelector.language}">
| <f:selectItem itemLabel="English" itemValue="en"/>
| <f:selectItem itemLabel="Francais" itemValue="fr"/>
| <f:selectItem itemLabel="Romana" itemValue="ro"/>
| </h:selectOneMenu>
| <s:button action="#{localeSelector.select}" value="ChangeLanguage"/>
>From what I know, JSF searches the properties files in the following order:
pmResources_ro.properties
pmResources_ro_RO.properties
pmResources_en.properties
pmResources_en_US.properties
pmResources_fr.properties
pmResources_fr_FR.properties
pmResources.properties
Can anyone help me with this ? Thanks in advance!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4078601#4078601
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4078601
More information about the jboss-user
mailing list