Adding resource bundles for a new language
To allow your 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 that is used in Java code.
About this task
In WebSphere® Portal, resource bundles are in the JAR file wp.ui.jar in the nls directory inside the file.
- AIX®: PortalServer_root/ui/wp.ui/shared/app
- HP-UX: PortalServer_root/ui/wp.ui/shared/app
- IBM® i: PortalServer_root/ui/wp.ui/shared/app
- Linux: PortalServer_root/ui/wp.ui/shared/app
- Solaris: PortalServer_root/ui/wp.ui/shared/app
- Windows: PortalServer_root\ui\wp.ui\shared\app
- AIX: wp_profile_root/PortalServer/config/nls
- HP-UX: wp_profile_root/PortalServer/config/nls
- IBM i: wp_profile_root/PortalServer/config/nls
- Linux: wp_profile_root/PortalServer/config/nls
- Solaris: wp_profile_root/PortalServer/config/nls
- Windows: wp_profile_root\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 that are supplied with the portal do not use it.
- AIX: wp_profile_root/PortalServer/config/nls
- HP-UX: wp_profile_root/PortalServer/config/nls
- IBM i: wp_profile_root/PortalServer/config/nls
- Linux: wp_profile_root/PortalServer/config/nls
- Solaris: wp_profile_root/PortalServer/config/nls
- Windows: wp_profile_root\PortalServer\config\nls
- [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 that are defined for WebSphere Portal need to have resource bundles that are defined as well for the themes to function correctly. After you install a new language, complete the following steps to add and process the resource bundles in the wp.ui.jar file:
Procedure
- Copy all existing resource bundles into wp_profile_root/PortalServer/config/nls directory.
- Name the resource bundles according to the naming convention for resource bundles with locale code for the languages installed.
- Convert 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 your WebSphere Portal so that it recognizes the new resource bundles.