Reputation: 150
I'm trying to make my jsf application support resources from multiple locales.
I've already created the contents on the resources folder and that works fine when I have the following on my faces.config:
<supported-locale>en</supported-locale>
<supported-locale>fr</supported-locale>
However, I'd like to support US English, Canadian English and UK English, for instance.
How do I go about doing that?
<supported-locale>en_CA</supported-locale>
<supported-locale>en_US</supported-locale>
The above doesn't seem to work. Any suggestions are highly appreciated! Thanks.
Upvotes: 0
Views: 161
Reputation: 150
The supported locales actually work as described above:
<supported-locale>en_CA</supported-locale>
<supported-locale>en_US</supported-locale>
My problem was that en_CA and en_US should not be inside the "en" folder in the resources folder. They should be subfolders of resources.
.resources
..en
..en_CA
..en_US
Rather ugly but I guess that's how JSF wants it. Nested folders would be more elegant in my opinion.
Upvotes: 2