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:
- [bundle]_[language]_[country]_[variant].properties
- [bundle]_[language]_[country].properties
- [bundle]_[language].properties
- [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.
- Copy all existing resource bundles into...
WP_PROFILE/PortalServer/config/nls
- Name the resource bundles according to the naming convention for resource bundles with locale code for the languages installed.
- Translate the resource bundle files.
- 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.
- Restart the WebSphere Portal so that it recognizes the new resource bundles.
- Resource bundles to support a Portal based custom theme
We can add supported locale to the system. We must provide resource bundles for the new language to the Portal based custom theme to enable them.
Parent Support a new language
Related information
native2ascii - Native-to-ASCII Converter