2 Replies Latest reply on Aug 10, 2009 11:36 PM by kipod

    Locales: custom "messages_he.properties" messages aren't displayed

      Hello all,
      In a simple out-of-the-wizard's-box Seam project,
      I can't seem to get my custom made messages for the Hebrew locale displayed.
      I'm trying the customize validation messages,
      e.g. javax.faces.component.UIInput.REQUIRED .


      faces-config.xml snippet:



      <locale-config>
              <default-locale>en</default-locale>
              <supported-locale>en</supported-locale>
              <supported-locale>he</supported-locale>
              <supported-locale>fr</supported-locale>
      </locale-config>






      relevant snippet in facelet page:



      <h:form>
              <h:selectOneMenu value="#{localeSelector.localeString}">
                      <f:selectItems value="#{localeSelector.supportedLocales}" />
              </h:selectOneMenu>
              <h:commandButton action="#{localeSelector.select}"
                      value="#{messages['ChangeLanguage']}" />
      </h:form>






      and of course the .properties files exist:
      messagesen.properties
      messages
      fr.properties
      messageshe.properties


      For the 'en' and the 'fr' locales, it works just fine.
      As for the 'he' one, Seam or JSF or something else along the way
      blurts out:



      "j_id11:j_id15:j_id17: Validation Error: Value is required."



      (which I definitely did not dictate anywhere).
      I thought it had something to do with character encodings,
      even though I originally supplied the messages by the \u**** encodings,
      so I changed the messages
      he.properties file to have only English
      messages in it.
      Still no go.


      I would really appreciate any help or explanation on the matter,
      Thanks!


        • 1. Re: Locales: custom "messages_he.properties" messages aren't displayed
          a more readable version of the last part:

          and of course the .properties files exist:
          messages_en.properties
          messages_fr.properties
          messages_he.properties

          For the 'en' and the 'fr' locales, it works just fine. As for the 'he' one, Seam or JSF or something else along the way blurts out:

          "j_id11:j_id15:j_id17: Validation Error: Value is required."

          (which I definitely did not dictate anywhere). I thought it had something to do with character encodings, even though I originally supplied the messages by the \u**** encodings, so I changed the messages_he.properties file to have only English messages in it.
          Still no go.
          • 2. Re: Locales: custom "messages_he.properties" messages aren't displayed

            one simple observation:


            Tried putting my own message in messages_he.properties :


            welcome=Shalom


            and displaying it as a label on page:


            <h:outputText value="#{messages['welcome']}" />


            But it shows up as "welcome", and not as "Shalom".
            When doing the exact same thing with the messages_fr.properties - it works.


            For some reason, the app ain't using my messages_he.properties ...


            Any advice would be very much welcomed.