3 Replies Latest reply on Apr 7, 2006 10:55 AM by liudan2005

    locale is not supported?

    liudan2005

      I don't know whether this is a myfaces or facelets problem. Since I can't find a solution anywher, I have to try to post it here.

      I have this in my faces-config.xml:

       <application>
       <message-bundle>resources.application</message-bundle>
       <locale-config>
       <default-locale>en_GB</default-locale>
       <supported-locale>en_US</supported-locale>
       </locale-config>
       </application>
      


      and my jsf code is like:
      <h:commandButton value="#{bundle.mytext}" />
      


      No matter how I change the default-locale, mytext is always showing the words from application_en_US.properties file.

      Also using <f:view locale="..."> wouldn't make any different.

      Has anyone experienced this problem?



        • 1. Re: locale is not supported?
          mirko27

          Please update your documentation from Seam CVS(Trailblaizer has movie for it).
          I think that these might be useful lines from there:

          If there is a locale associated with the HTTP request (the browser locale), and that locale is in the list of
          supported locales from faces-config.xml, use that locale for the rest of the session.
          ? Otherwise, if a default locale was specified in the faces-config.xml, use that locale for the rest of the session.
          ? Otherwise, use the default locale of the server.

          So if your browser has en_US setting then this should be the problem....

          • 2. Re: locale is not supported?
            gavin.king

            Right, the request locale is used in preference to the default locale. (This is very correct, btw!)

            • 3. Re: locale is not supported?
              liudan2005

              Thanks for your help. Using localeSelect solved my problem.