[jboss-user] [JBoss Seam] - Internatinalization: messages only default messages.properti
rengar
do-not-reply at jboss.com
Wed Dec 20 08:16:06 EST 2006
Two messages.properties :
| messages.properties
| ---------------------------
| ChangeLanguage=Change
|
| ###########################
|
| messages_es.properties
| ------------------------------
| ChangeLanguage=Cambiar
|
|
In faces-config.xml :
| <application>
| <message-bundle>messages</message-bundle>
| <view-handler>org.jboss.seam.ui.facelet.SeamFaceletViewHandler</view-handler>
| <locale-config>
| <default-locale>es</default-locale>
| <supported-locale>en</supported-locale>
| </locale-config>
| </application>
|
In xhtml page :
| <h:form id="selectLanguage">
| <h:selectOneMenu value="#{localeSelector.language}">
| <f:selectItems value="#{localeSelector.supportedLocales}"/>
| </h:selectOneMenu>
| <h:commandButton action="#{localeSelector.select}" value="#{messages['ChangeLanguage']}"/>
| </h:form>
|
-Combobox shows 2 : español, English --> OK
-If I change to English --> Button #{messages['ChangeLanguage']} shows "Change" --> OK
-If I change to Spanish --> Button #{messages['ChangeLanguage']} shows "ChangeLanguage" --> ERROR
what is the problem?
Any idea?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3995288#3995288
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3995288
More information about the jboss-user
mailing list