Try 
org.apache.turbine.services.localization.LocalizationTool.getLocale( ) 
And/or 
org.apache.turbine.services.localization.LocaleDetector.getLcale() 

one of them sould be working AFAIK 

my regards 


-----Original Message-----
From: Holger Dewes [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 22, 2003 12:10 PM
To: 'Jetspeed Users List'
Subject: RE: How to determine language in a portlet?



> -----Original Message-----
> From: Michael Burschik [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, October 22, 2003 12:02 PM
> To: 'Jetspeed Users List'
> Subject: AW: How to determine language in a portlet?
> 
> 
> > I don't know if Jetspeed provides any methods for that, but you can 
> > get it from the request (which is also used by Jetspeed to 
> decide the
> > localization):
> > runData.getRequest().getLocale()
> >
> > From the javadoc:
> > Returns the preferred Locale that the client will accept 
> content in, 
> > based on the Accept-Language header. If the client request doesn't 
> > provide an Accept-Language header, this method returns the default 
> > locale for the server.
> 
> Thanks for the reply. But unfortunately, that does not seem 
> to be what I need either, since the Accept-Language header of 
> the client does not change when the user selects a language 
> using a select language portlet.
> 

No, the Accept-Language header only specifies the preferred languages of
the user as specified by the client (i.e. the browser). So it cannot be
changed by the portal framework. I don't know what the select language
portlet does. But when I played around with localization and I changed
the preferred languages using my browser, it always worked as expected.
I never used the select language portlet.

Cheers,

Holger


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to