2 Replies Latest reply on May 14, 2009 3:34 AM by surfingspider

    Switching locales not displaying

    surfingspider

      Hi,


      I am trying to internationalize my application and have copied the approach in chapter 14 of the seam documentation (drop down list with locales populates from faces-config.xml) and that shows. HOwever when submitting the form nothing happens! (even though the localeSelector.language is updated and displays.


      My faces-config.xml is


      <locale-config>
           <default-locale>ru_RU</default-locale>
           <supported-locale>en_AU</supported-locale>
           <supported-locale>ru_RU</supported-locale>
      </locale-config>
      <message-bundle>Messages</message-bundle>
      <message-bundle>Formats</message-bundle>
      



      my messagesxxXX.properties files are:


      (en_AU)
      applicationCompany=XYZ
      (ru_RU)
      applicationCompany=Миф
      



      the facelets page is just


      <f:loadBundle var="msg" basename="Messages"/>
      <h2>#{msg.applicationCompany}</h2>
      



      in addition to the select and form. Please help!


      ss/dp

        • 1. Re: Switching locales not displaying
          david.salter

          What does your locale selector form look like?


          Do you call #{localeSelector.select} on a form action?

          • 2. Re: Switching locales not displaying
            surfingspider

            Hi David,


            The form part is copied right out of chapter 14:


            <h:form>
            <h:selectOneMenu value="#{localeSelector.localeString}">
                <f:selectItems value="#localeSelector.supportedLocales}"/>
            </h:selectOneMenu>
            <h:commandButton action="#{localeSelector.select}" value="#{msg.changeLanguage}"/>
            </h:form>
            



            it shows the two locales set up in faces-config.xml


            Reading through the tomb that is the system.log file finds the localeSelector, there are no warnings for not finding a locale specific properties file for the locale change, or any indication of a switch at all.


            Can having the file named messagesxxxx.properties and specified in faces-config.xml be an issue?