2

I configured a default locale, and set up a text.properties + text_de.properties.

<application>
    <locale-config>
        <default-locale>en</default-locale>
    </locale-config>
    <resource-bundle>
        <base-name>text</base-name>
        <var>text</var>
    </resource-bundle>
</application>

Now, if I go to the website with german locale settings, the text is taken from text_de! Even though it is not configured as supported language!?

It that intended by jsf?

membersound
  • 81,582
  • 193
  • 585
  • 1,120

1 Answers1

0

Here is the precedence list of JSF local sources:

  • Search for a match between request locales (Header Accept-Language) and supported locales
  • Application default locale of the faces config file
  • JVM default locale

(From here: http://www.i-coding.de/www/en/jsf/application/locale.html)

Note that request local has a highere precedence than default locale, and - as it seems - there is no need to put it into the support locales node.

Gergely Bacso
  • 14,243
  • 2
  • 44
  • 64
  • tyvm! according to you link I set my default property file to text_en, so now changing locale in browser works as I expected. – membersound Feb 26 '12 at 13:15