+

Search Tips   |   Advanced Search

Add resource bundles for a new language

To allow the portal users to work in an extra language, you add resource bundles for that language. Resource bundles are used to store text that is displayed in JSPs or text used in Java code.

In WebSphere Portal, resource bundles are in the JAR files wp.ui.jar and wp.theme.customizer.ext.jar in the nls directory inside the file.

The JAR file wp.ui.jar is in the following directory:

    PORTAL_HOME/ui/wp.ui/shared/app

The JAR file wp.theme.customizer.ext.jar is in the following directory:

    PORTAL_HOME/theme/wp.theme.customizer.ext/shared/app

To add new resource bundles for extra languages, place them in the following directory:

    WP_PROFILE/PortalServer/config/nls

The naming convention for resource bundles is [bundle]_[language]_[country]_[variant].properties. The ISO standard ISO-639 is used for the language codes of most languages. For Hebrew, the old language code iw is used. The ISO standard ISO-3166 is used for the country/region codes. WebSphere Portal supports the use of [variant], although resource bundles supplied with the portal do not use it.

If our portal configuration includes Lotus Collaborative Services, add a CSRes_language.properties file for each additional language to the following directory:

    WP_PROFILE/PortalServer/config/nls

WebSphere Portal uses properties files called by the Java class java.util.ResourceBundle to store text rendered in JSPs. The Java mechanism searches for the resource bundles in the following order:

  1. [bundle]_[language]_[country]_[variant].properties
  2. [bundle]_[language]_[country].properties
  3. [bundle]_[language].properties
  4. [bundle].properties

In WebSphere Portal, the default bundles [bundle].properties are in English.

All languages defined for WebSphere Portal need to have resource bundles defined as well for the themes to function correctly. After installing a new language, add and process the resource bundles located within wp.ui.jar and wp.theme.customizer.ext.jar using the procedure outlined in the following.

  1. Copy all existing resource bundles into...

      WP_PROFILE/PortalServer/config/nls

  2. Name the resource bundles according to the naming convention for resource bundles with locale code for the languages installed.

  3. Translate the resource bundle files.

  4. Convert them into Unicode with the Native-to-ASCII converter native2ascii that comes as part of JDK. For more detail about native2ascii, go to the Java documentation native2ascii - Native-to-ASCII Converter.

  5. Restart the WebSphere Portal so that it recognizes the new resource bundles.


Parent Support a new language


Related information


native2ascii - Native-to-ASCII Converter