-
1. Re: Bug of i18n with the file name of upper or lower charate
seto Dec 7, 2006 12:24 AM (in response to seto)I use the version of 1.1 CR2
-
2. Re: Bug of i18n with the file name of upper or lower charate
seto Dec 7, 2006 12:30 AM (in response to seto)the code in the template.xhtml
<h:selectOneMenu value="#{localeSelector.language}">
<f:selectItems value="#{localeSelector.supportedLocales}"/>
</h:selectOneMenu>
#{localeSelector.language}
<h:commandButton action="#{localeSelector.select}" value="#{messages['ChangeLanguage']}"/>
code in faces-config.xml
<!-- i18n -->
<locale-config>
<default-locale>zh_CN</default-locale>
<supported-locale>zh_CN</supported-locale>
<supported-locale>zh_TW</supported-locale>
<supported-locale>en</supported-locale>
</locale-config> -
3. Re: Bug of i18n with the file name of upper or lower charate
seto Dec 7, 2006 6:09 AM (in response to seto)I means that if the file name use the capital letter, i will load the wrong resource bundle. Hoping for your help
-
4. Re: Bug of i18n with the file name of upper or lower charate
seto Dec 7, 2006 6:34 PM (in response to seto)Please help me with this problem. At least let me know that it is a bug or a mistake with my code.
-
5. Re: Bug of i18n with the file name of upper or lower charate
pmuir Dec 7, 2006 6:49 PM (in response to seto)Seam just delegates to the standard resourcebundle for loading. Have you tried loading the resourcebundle yourself? Does that work?
-
6. Re: Bug of i18n with the file name of upper or lower charate
seto Dec 8, 2006 5:54 AM (in response to seto)The delegate works absolutely. But I mean that it doesn't meet the standard the country code should be upper charater. And it just load the file with country code in the lower charater. You know that java is case-sensive. So I means that loading code is set to only load the country code in lower charater file name.
-
7. Re: Bug of i18n with the file name of upper or lower charate
seto Dec 8, 2006 7:31 AM (in response to seto)Solved it. My mistake of reading documents.
Change <h:selectOneMenu value="#{localeSelector.language}"> to <h:selectOneMenu value="#{localeSelector.localeString}">.
Thanks petemuir. You're the only one helps me unlike the others.