9.5.3. Translate the Language Selection Form

Language Selection Screen
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

  1. Edit the JPP_HOME/gatein/gatein.ear/portal.war/WEB-INF/classes/locale/portal/webui_xx_yy.properties file where xx_yy represents the country code of the language you wish to translate.
  2. In that file, add or modify a key such as Locale.xx_yy with the xx_yy value being the translated string.
  3. Edit JPP_HOME/gatein/gatein.ear/portal.war/WEB-INF/classes/locale/portal/webui_fr.properties where 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.