5 Replies Latest reply on Nov 21, 2008 1:22 PM by Paul DiMilla

    rich:calendar apply button i18n not working for me

    Paul DiMilla Newbie


      Thank you in advance for any help you can give me. I have had mixed results in trying to internationalize rich:calendar. The month and day names work fine. Apply, Today and the other buttons always end up using the strings specified in my en_US properties file regardless of locale. I do have property files for my other locales and I do define the correct translations for RICH_CALENDAR_TODAY_LABEL, etc. I have read the other posts on this subject and have tried the solution that has worked for the others; however, it is not working for me. Am I doing too much?

      Here's what I have in faces-config.xml:


      Here is where I define my calendar:

      <rich:calendar id="tsoDateTime" popup="true"

      I also define the msgs variable at the beginning:

      <body >
       <f:view locale="#{mednetSessionInfo.locale}">

      And here is the resources from my_messages_fr_CA:

      submitRequestDialogDateFormat=d/M/yyyy HH:mm

      Please note that my calendar is contained within a form that is within a modalPanel.

      I am using RichFaces 3.2.2, JBoss 4.2.2.GA and IE 6.

      Thank You,

        • 1. Re: rich:calendar apply button i18n not working for me
          Mikhail Vitenkov Newbie

          Hello, Paul.

          rich:calendar apply, cancel and others button i18n working fine for me.
          Follow the next instructions:

          1) Set supported locales in faces-config:


          2) Add properties files in following package inside your resource folder:


          3) Fill properties files using RICH_CALENDAR_APPLY_LABEL, RICH_CALENDAR_TODAY_LABEL ...

          4) Define locale calendar attribute:
          <rich:calendar ...locale="#{calendarBean.locale}"

          See result for russian internalization:

          If it will not help you, let us know.

          • 2. Re: rich:calendar apply button i18n not working for me
            Paul DiMilla Newbie

            Thank you for the reply. I tried a couple of the things you mentioned and it is still not working. I think I may be missing something.

            1) I created a file called org.richfaces.renderkit.calendar_fr_CA.properties. I placed all of my "_LABEL" resources in it. I then placed the file in the same folder as my other resource files. Was this correct or was I supposed to use a org.richfaces.renderkit.calendar_fr_CA.properties file that comes with RichFaces? And did I put it in the correct place?

            2) I removed the message-bundle tag that I had in faces-config.xml so that my faces-config looks like yours. This did not correct the problem either.

            I am going to play around with locale next; although, I thought I was already setting this correctly. Perhaps not...

            • 3. Re: rich:calendar apply button i18n not working for me
              Paul DiMilla Newbie

              I discovered one of my errors; however, this did not fix the problem either.

              Rather than name my properties file org.richfaces.renderkit.calendar_fr_CA.properties and putting it in the same folder as my other properties files (which is WEB-INF\classes\com\myco\resources), I named it calendar_fr_CA.properties and placed it in WEB-INF\classes\resources\org\richfaces\renderkit.

              Again, this did not work for me either.

              • 4. Re: rich:calendar apply button i18n not working for me
                Ilya Shaikovsky Master

                pdimilla, please send me the war sample with sources directly. I'll check it and correct if need. It will be faster to update you in this way.

                • 5. Re: rich:calendar apply button i18n not working for me
                  Paul DiMilla Newbie

                  Solved it! It turns out I had three remaining errors. Here are the fixes:

                  1) I placed org\richfaces\renderkit\calendar_fr_CA properties directly under WEB-INF\classes rather than under WEB-INF\classes\resources.

                  2) I am now getting the locale from a backing bean rather than from my messages.properties file.

                  3) I discovered that the apostrophe in the word "aujourd'hui" was causing my calendar not to open. Once I removed the apostrophe, the calendar opened and all my buttons had their translations.

                  Thanks again for your help!