Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to set the locale in JSR 168 API portlet?(using wps 6.1)

 
kasyaparushi kiran
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

How to set the locale in portlets?
I am using wps 6.1 (jsr 168 api).


Thanks,
KKK
 
Bhagat Singh Rawat
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Add <supported-locale>en</supported-locale> in portlet deployment descriptor.

for more information please go through the "PLT.21.8.2 and PLT.21.9" sections in Portlet specification 1.0.





 
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper
Posts: 4968
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And this entry will indicate that a portlet being deployed supports a given locale.

However, the portlet must have appropriate translations incorporated to support this locale. And the client will need to either request this locale through registration or browser settings. Of course, if this is the only locale that the portlet supports, this locale will always be used during rendering.

But what are you setting the locale for? For the portlet, or for the client? The client has various ways to tell the server which locale they prefer.

-Cameron McKenzie
 
kasyaparushi kiran
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to set the locale programatically.
For ex in portal page if i select locale in selection box from one portlet (say locale portlet) it should take locale specific resource bundle.


Thanks & Regards,
K.Kiran Kumar
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic