Change the language
Change the default portal language
To change the default language of the portal, go to...
Administration | Portal settings | Global SettingsFrom the pull down list, select the desired default language for the portal. For example, en for English.
The value for the default portal language is stored in...
$WP_ROOT/shared/app/config/services/LocalizerService.propertiesYou can disable right-to-left (RTL) rendering for a bidirectional language or add a new language.
Portlets
A portlet can support one or more locales. All portlets must have their own default language specified in the deployment descriptor. Otherwise the portlet cannot be installed.
Change titles for pages
To edit titles for pages in the portlet, go to...
Administration | Portal User Interface | Manage pages | Edit | Advanced...and select the option for setting page titles and descriptions. You can enter a different title for each available language.
Language selection by the user
The user can select the preferred language for rendering portal content during the enrollment process. The user can select from a list of available languages. If desired, the user can later change the selected language in the self care portlet by selecting Edit my profile. The selection list shown to the user for choosing a language shows all available portal languages. The list corresponds to the languages in...
/wp_root/shared/app/config/language.propertiesNote that the user's language selection does not become effective until after the user has logged in.
Language determined by the portal
The portal determines the language for rendering the portal content by a search process along the following sequence at login time:
- If the user has logged in, the portal displays in the preferred language selected by the user.
- If no preferred user language can be found, the portal looks for the language defined in the user's browser. If the portal supports that language, it displays the content in that language. If the browser has more than one language defined, the portal uses the first language in the list to display the content.
- If no browser language can be found, for example if the browser used does not send a language, the portal resorts to its own default language.
- If the user has a portlet that does not support the language that was determined by the previous steps, that portlet is shown in its own default language.
The sequence listed above describes the language selection process that is applied for each user at logon time. For pages viewed by anonymous users only the last three steps for determining the language apply. This applies, for example, before login and after log off.
The language determined by this selection process is applied to the complete portal. If the portal or one component does not find the appropriate resources for the language as selected by this sequence, it tries to find the resources in a similar language. For example, if the determined language was US English (en_US), the next closest option is English (en). The language is determined as follows:
- For the resource bundles by the file name in the sequence
- For the JSPs by the hierarchy of the directory structure
This search sequence applies to all portal components individually down to portlets. For example, if a portlet does not support the language selected by the portal, it is shown in default language of the portlet. This way, the portal can show individual portlets in different languages.
If a page does not support any of the languages determined by the steps above, then the object ID of the page is displayed in the navigation rather than its title. Such an object ID can be, for example, 7_0_5T .
Dynamically change the language during the session
To alow users to change their language during a session, set...
<wps:url command="ChangeLanguage"> <wps:urlParam name="locale" value="language"/> </wps:url>...where language is the required language, such as en, de, or fr. All supported portal languages are listed in...
wp_root/shared/app/config/language.propertiesFor users to be able to dynamically change the language for the session, add a link to the portal theme with the following text and link reference:
- The text displayed with the link specifies the language to change to.
- The link reference calls the command described above with the locale parameter corresponding to the specified language.
Users can then click this link to change to the language specified by the locale parameter with the command. If you want to make more than one language available to users, you create a separate link for each language.
Example: To create links for English and German, add the lines shown in the following example to the file...
< was_root/installedApps/node_name/wps.ear/wps.war/themes/html/PlaceBarInclude.jsp: --> <!-- Navigation --> <td> ... </td> <!-- add these lines --> <td> <a href="<wps:url command="ChangeLanguage"><wps:urlParam name="locale" value="en"/></wps:url>">English</a> <a href="<wps:url command="ChangeLanguage"><wps:urlParam name="locale" value="de"/></wps:url>">Deutsch</a> </td> <!-- Favorites --> ...Note: The changed setting applies only for the duration of the current session. When the user logs out and back in again, the portal applies the default language as determined by the four steps described under Language determined by the portal.
See also
- Language support
- Change the character set for a language
- Supporting a new language
- Portal configuration
- Administering your portal
WebSphere is a trademark of the IBM Corporation in the United States, other countries, or both.
IBM is a trademark of the IBM Corporation in the United States, other countries, or both.