
Image displaying the available languages in the portal, with French selected.
Figure 9.1. Language Selection Screen
When choosing a language from the Language Select screen, the user is presented with a list of languages on the left side in the current chosen language. On the right side, the same language is translated into its own language.
The local language values are obtained from the JDK API
java.util.Locale.getDisplayedLanguage() and java.util.Locale.getDisplayedCountry() (if needed). Not all languages may be translated, and the languages available can also depend on the JVM currently used.
It is possible to override these values by editing the
locale.portal.webui resource bundle.
Procedure 9.3. Overriding Default JDK API Language Values
- Edit the
JPP_HOME/gatein/gatein.ear/portal.war/WEB-INF/classes/locale/portal/webui_file wherexx_yy.propertiesxx_yyrepresents the country code of the language you wish to translate. - In that file, add or modify a key such as
Locale.with thexx_yyxx_yyvalue being the translated string. - Edit
JPP_HOME/gatein/gatein.ear/portal.war/WEB-INF/classes/locale/portal/webui_fr.propertieswhere fr is the country code for French, and add the following key into it:Locale.zh_TW=Chinois traditionnel
When the portal is next restarted, the localized language will be updated in the user interface when a user tries to change the current language.