5 Replies Latest reply on May 28, 2008 3:34 AM by janson12

    internationialization and rich:calendar

    ajanz

      hi,

      i want to use the rich:calendar component.

      i read in the documentation i could change the labels using application resource bundle. but which var name must be used?


      i defined

       <application>
       <resource-bundle>
       <base-name>mybundle</base-name>
       <var>msg</var>
       </resource-bundle>
       </application>
      


      what must i use in the var tag?



        • 1. Re: internationialization and rich:calendar
          ilya_shaikovsky

          you should perform nothing except define the bundle and add proper properties. Calendar will automatically handle them.

          • 2. Re: internationialization and rich:calendar
            ajanz

            i defined


            RICH_CALENDAR_TODAY_LABEL=Heute
            todayLabel=Auch Heute
            


            in my bundle. i verified that it is loaded by binding todayLabel to an outputLabel on the page.

            But i still got "today" on the calendar component.

            what could i have done wrong?

            • 3. Re: internationialization and rich:calendar

              1.) create your bundles somewhere in your classpath like that:

              (richfaces_de.properties)

              #### Calendar Labels ####

              RICH_CALENDAR_APPLY_LABEL = Übernehmen
              RICH_CALENDAR_TODAY_LABEL = Heute
              RICH_CALENDAR_CLOSE_LABEL = Schliessen
              RICH_CALENDAR_OK_LABEL = OK
              RICH_CALENDAR_CLEAN_LABEL = Zurücksetzen
              RICH_CALENDAR_CANCEL_LABEL = Abbruch


              2.) define you bundle in faces-config as following:

              <application>
              <message-bundle>
               de.project.web.message.richfaces_en</message-bundle>
              <message-bundle>
               de.project.web.message.richfaces_de</message-bundle>
              </application>


              The rest goes without additional efforts, just place your calendar on your jsp and the current language will be displayed if the respective property file is available.

              • 4. Re: internationialization and rich:calendar
                ajanz

                ok thank you. now it works.


                i used myfile_de.properties instead of richefaces_de.properties.

                • 5. Re: internationialization and rich:calendar

                  name shouldn't have any impact as long as you follow the "name_language.properties" pattern and declare it with "<message-bundle>" in your faces-config.xml.