• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 5009
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic