• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

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

 
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
 
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.





 
author and cow tipper
Posts: 5000
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
 
This guy is skipping without a rope. At least, that's what this tiny ad said:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic