5 Replies Latest reply on Mar 11, 2010 7:31 AM by Pierre Masse

    Issue with rich:calendar and internationalization

    Mariano Arg Newbie

      This is driving me crazy. I don't know why but I can't render the rich:calendar component in my app.

       

      I'm getting the following exception: java.util.MissingResourceException: Can't find bundle for base name labels, locale es

      (labels_es.properties is the file name)

       

      It's odd because all I have in my .xhtml file is this:

       

      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      <html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets"
          xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"
          xmlns:rich="http://richfaces.org/rich" xmlns:a4j="http://richfaces.org/a4j">


          <body>
              <rich:calendar/>
          </body>

       

      </html>

       

      In addition, internationalization works just fine in the same page if I remove the calendar component and add something like:

       

      <h:outputText value="#{labels.titulo}" />

       

      Of course I'm loading the bundle and it's defined in the faces-config.xml:

       

          <application>
              <view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
              <locale-config>
                  <default-locale>es</default-locale>
              </locale-config>
              <message-bundle>labels</message-bundle>
          </application>

       

      I tried adding the calendar labels to the bundle but nothing changed

       

      RICH_CALENDAR_TODAY_LABEL=Hoy
      RICH_CALENDAR_CLEAN_LABEL=Limpiar
      RICH_CALENDAR_APPLY_LABEL=Aplicar
      RICH_CALENDAR_CLOSE_LABEL=Cerrar
      RICH_CALENDAR_OK_LABEL=Ok
      RICH_CALENDAR_CANCEL_LABEL=Cancelar

       

      I also changed the locale to "en" but got the same error.

       

      I've been trying to fix this issue for the last 4 hours and I really don't know what else to do... could anyone help me please?

       

      Thanks in advance!

      Mariano