6 Replies Latest reply on Mar 2, 2009 7:01 AM by sebo sebo

    localization/internationalization extendedDataTable

    devon lindsey Newbie

      I'm using richfaces 3.3.0 using extended data table. I need to localize the text for extended data table. I tried to pass in the "lang" attribute but that didn't seem to do it. Does anyone have any advice for how I can get translated text into this table?

      Thank you,

        • 1. Re: localization/internationalization extendedDataTable
          Nick Belaevski Master


          It should be possible to localize it either using org.richfaces.component.messages or application-defined message bundle. Here is an example of this file:

          org.richfaces.component.UIExtendedDataTable.Menu.SortAscending=Sort Ascending
          org.richfaces.component.UIExtendedDataTable.Menu.SortDescending=Sort Descending
          org.richfaces.component.UIExtendedDataTable.Menu.GroupByColumn=Group by this column
          org.richfaces.component.UIExtendedDataTable.Menu.DisableGrouping=Disable Grouping
          org.richfaces.component.UIExtendedDataTable.NoData=No data

          Try setting locale explicitly on f:view tag or selecting another locale in browser settings.

          • 2. Re: localization/internationalization extendedDataTable
            devon lindsey Newbie

            Thanks so much for responding but I'm not sure exactly what your instructions are here. I'm essentially wondering where and how I can create the "application-defined message bundle." I have dynamic bundles and property files, but how do I get the extended data table to point to those translated values?
            Moreover, why doesn't this element work like the other richfaces elements, like the calendar, where it reads locale from the session?

            Any help is appreciated!

            • 3. Re: localization/internationalization extendedDataTable
              Nick Belaevski Master

              Application-defined message bundle is configured by adding something like this to faces-config.xml:

              and adding properties files in classpath. Another way to localize this is creating org.richfaces.component.messages message bundle in application classpath (this is predefined name, you don't have to configure this in faces-config.xml).

              Calendar takes date formatting symbols from JDK, another text elements (e.g. "Today") need localization through message bundles.

              • 4. Re: localization/internationalization extendedDataTable
                devon lindsey Newbie

                Thanks again for the reply nbelaevski.
                I'm wondering if you can point me to whereever the calendars message bundles are, and perhaps I can follow that model for extended data table? Because my biggest concern at this point is why I have to handle the behaviors of the objects differently.
                We have registered property files, i have all of our local's configured properly, our entire site is localized, I'm just trying to figure out how to make the extended data table read our property files.

                • 5. Re: localization/internationalization extendedDataTable
                  Nick Belaevski Master

                  About calendar: there are not much examples. Here is the information - the following properties are used for localization:


                  Either application message bundle (defined in faces-config.xml) or classpath org.richfaces.renderkit.calendar (e.g. org/richfaces/renderkit/calendar_de.properties file) can be used.

                  Back to extendedDataTable. richfaces-impl.jar already contains localization for several languages (org/richfaces/component/messages.properties). You can either create your own .jar containing localization files by this path and use this .jar file to localize several applications, or configure application message bundle and add org.richfaces.component.UIExtendedDataTable.* messages there.

                  • 6. Re: localization/internationalization rich:picklist
                    sebo sebo Newbie

                    Is it right way to change inscription on picklist buttons ?