+

Search Tips   |   Advanced Search


Dynamically changing the language during the session

Allow users to change the language during their session. :If you want your users to be able to change the language during the session, use the following command provided by WebSphere Portal:

<portal-navigation:url command="ChangeLanguage">
   <portal-navigation:urlParam name="locale" value="language"/>
</portal-navigation:url>

where language is the two character code for the required language, such as en, de, or fr. For a list of the available languages and their two character codes refer to Language support.

For 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:

Users can then click this link to change to the language specified by the locale parameter with the command. 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 banner_toolbar.jsp :

<!-- add these lines -->
<a href="<portal-navigation:url command="ChangeLanguage"><portal-navigation:urlParam name="locale" 
     value="en"/></portal-navigation:url>">English</a>
<a href="<portal-navigation:url command="ChangeLanguage"><portal-navigation:urlParam name="locale" 
     value="de"/></portal-navigation:url>">Deutsch</a>



<%-- logout button --%>

The file banner_toolbar.jsp resides in the following directory:

Notes:


Parent topic:

Language support


Related concepts


Set the language fallback filter


Related information


Supporting a new language
Changing the character set for a language
Select and changing the language
Tags used by the portal JSPs