WebSphere Portal Server - Where to get locale

This is Interesting: Free IT Magazines  
Home > Archive > WebSphere Portal Server > October 2006 > Where to get locale





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Where to get locale

2006-10-16, 1:28 pm

Hi,

In a portlet application I provide some links to change the locale if the user wants to change the locale in the middle of the session. For this I provide a language links in the current theme using the following command

<a href="<wps:url command="ChangeLanguage"><wps:urlParam name="locale" value="fr_CH"/></wps:url>">French</a>

In Portal Server5.1 PortletRequest.getLocale() method returns the desired locale when the user clicks on the provided link for that request and for subsequent requests PortletRequest.getLocale() methods returns the first locale from the browser language s
ettings. In Portal Server 5.0 version PortletRequest.getLocale() method returns the locale selected by the user for further requests until the user chooses another language.

And also in 5.0 PortletRequest.getPathInfo() returns the string which contains the locale, when user clicks on the language link but in 5.1 it was completly encoded.

I want to know that where the Portal Server5.1 stores the locale selected by the user. Can anybody tell about this, I am very thankful to them.

Thank you

2006-10-18, 7:30 am

Portal Server retrieves locale as set by the user during registration. If locale is not set then it is obtained from accept-language header supplied by the client.

For JSR 168 Portlets, locale is set in the Portlet Deployment Descriptor using default-locale and supported locale.

Arch


Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com