Portlet Localization for anonymous user
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > WebSphere > WebSphere Portal Server > Portlet Localization for anonymous user




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Portlet Localization for anonymous user  


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-29-07 06:18 PM

Portlet jsp pages can be localized by using jstl format tag with resource bu
ndles. However the language preference is set by using portal's 'edit my pre
ferences' dialog.
How can user locale or language choice be changed for anonymous users of por
tal?





[ Post a follow-up to this message ]



    Re: Portlet Localization for anonymous user  


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-30-07 12:24 AM

For anonymous users it's picked up from request header set by the browser. F
or IE see Internet options->Languages...





[ Post a follow-up to this message ]



    Re: Portlet Localization for anonymous user  


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-30-07 12:24 AM

True, but I need to control among a few locales the app supports. Can I ask 
user to select a language and then let portal treat it like it does when a r
egistered user sets language preference?
I've noticed that the portal inserts a locale obj in request when a user set
s language. Is there a way to mimic it?

Thanks,





[ Post a follow-up to this message ]



    Re: Portlet Localization for anonymous user  
Dev Anand Reddy


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-30-07 12:30 PM

Websphere Portal Server supports the following command which you may insert 
in your theme or somewhere in the jsp.

<wps:url command="ChangeLanguage"><wps:urlParam name="locale"    value="fr"/
></wps:url>

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


Put the above command in anchor tag of html.
When user clicks on above provided links, the entire locale of the portal se
rver will be changed.

You can query the locale simply by calling PortletRequest objects getLocale(
) method. Or if you want to get simply the user locale try to get 'accept-la
nguage' header from request.









[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 11:51 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register