rich:calendar apply button i18n not working for me
pdimilla Nov 19, 2008 3:46 PMHello,
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:
<application> <locale-config> <default-locale>en_US</default-locale> <supported-locale>en_US</supported-locale> <supported-locale>en_UK</supported-locale> <supported-locale>fr_CA</supported-locale> <supported-locale>es_ES</supported-locale> <supported-locale>en</supported-locale> <supported-locale>fr</supported-locale> <supported-locale>es</supported-locale> </locale-config> <message-bundle> com.myco.resources.my_messages </message-bundle> </application>
Here is where I define my calendar:
<rich:calendar id="tsoDateTime" popup="true" firstWeekDay="#{msgs.submitRequestDialogFirstWeekDay}" monthLabels="#{msgs.submitRequestDialogMonthLabels}" monthLabelsShort="#{msgs.submitRequestDialogMonthLabelsShort}" weekDayLabels="#{msgs.submitRequestDialogWeekDayLabels}" weekDayLabelsShort="#{msgs.submitRequestDialogWeekDayLabelsShort}" showApplyButton="true" locale="#{msgs.submitRequestDialogLocale}" datePattern="#{msgs.submitRequestDialogDateFormat}" value="#{supportrequestbean.timeStamp}"> </rich:calendar>
I also define the msgs variable at the beginning:
<body > <f:view locale="#{mednetSessionInfo.locale}"> <a4j:loadBundle basename="com.myco.resources.my_messages" var="msgs"/>
And here is the resources from my_messages_fr_CA:
submitRequestDialogLocale=fr/CA submitRequestDialogDateFormat=d/M/yyyy HH:mm submitRequestDialogFirstWeekDay=1 submitRequestDialogMonthLabels=janvier,février,mars,avril,mai,juin,juillet,août,septembre,octobre,novembre,décembre submitRequestDialogMonthLabelsShort=jan,fév,mar,avr,mai,juin,juil,août,sep,oct,nov,déc submitRequestDialogWeekDayLabels=dimanche,lundi,mardi,mercredi,jeudi,vendredi,samedi submitRequestDialogWeekDayLabelsShort=dim,lun,mar,mer,jeu,ven,sam RICH_CALENDAR_APPLY_LABEL=Appliquer RICH_CALENDAR_TODAY_LABEL=aujourd'hui RICH_CALENDAR_CLOSE_LABEL=Fermer RICH_CALENDAR_OK_LABEL=OK RICH_CALENDAR_CLEAN_LABEL=nettoyer RICH_CALENDAR_CANCEL_LABEL=Annuler
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,
Paul