This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Portals and Portlets and the fly likes How to set the locale in JSR 168 API portlet?(using wps 6.1) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Portals and Portlets
Bookmark "How to set the locale in JSR 168 API portlet?(using wps 6.1)" Watch "How to set the locale in JSR 168 API portlet?(using wps 6.1)" New topic
Author

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

kasyaparushi kiran
Ranch Hand

Joined: May 05, 2009
Posts: 33
Hi,

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


Thanks,
KKK
Bhagat Singh Rawat
Ranch Hand

Joined: Apr 04, 2009
Posts: 93
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.






Brainbench Java 2.0 Fundamentals, J2EE 1.4
http://www.brainbench.com/transcript.jsp?pid=8192792
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper

Joined: Aug 26, 2006
Posts: 4968
    
    1

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

Joined: May 05, 2009
Posts: 33
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to set the locale in JSR 168 API portlet?(using wps 6.1)
 
Similar Threads
Designing a job portal System
Choosing Page Flow Portlets or Java Portlets - Weblogic
HOw to get session variables between portlets ?
EJB lookup from WPS Portal
Query on JSR 168 Struts portlet