You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by St...@swisscom.com on 2002/10/25 13:33:53 UTC
Internationalization - user setting the language manually?
Hi there!
I find the internationalisation feature of struts real nice, but there
is something that is bothering me. What if a browser doesn't have a
language setting, or if the user wants to change to a particular
language just for this one application? On most web-sites the user is
able to set the language himself (clicking on a flag or something), and
I was wondering if this is something that can be/is integrated in
struts? (setting an additional request parameter or something)
Regards,
Stef.
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Internationalization - user setting the language manually?
Posted by Tumi Mathibedi <tm...@csir.co.za>.
hi Stefan,
if (request.getLocale() == null) {
yada yada yada...
}
In short what I am saying is that u can have a logic to help solve the
browserNotSetLocale to do what you want.
On Fri 25 Oct 02 13:33, you wrote:
> Hi there!
>
> I find the internationalisation feature of struts real nice, but there
> is something that is bothering me. What if a browser doesn't have a
> language setting, or if the user wants to change to a particular
> language just for this one application? On most web-sites the user is
> able to set the language himself (clicking on a flag or something), and
> I was wondering if this is something that can be/is integrated in
> struts? (setting an additional request parameter or something)
>
> Regards,
>
> Stef.
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Internationalization - user setting the language manually?
Posted by Gemes Tibor <ge...@regens.hu>.
2002. október 25. 13:33 dátummal Stefan.Landro@swisscom.com ezt írtad:
> Hi there!
>
> I find the internationalisation feature of struts real nice, but there
> is something that is bothering me. What if a browser doesn't have a
> language setting, or if the user wants to change to a particular
> language just for this one application? On most web-sites the user is
> able to set the language himself (clicking on a flag or something), and
> I was wondering if this is something that can be/is integrated in
> struts? (setting an additional request parameter or something)
session.setAttribute(org.apache.struts.action.Action.LOCALE_KEY,newLocale);
Hth,
Tib
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
RE: Internationalization - user setting the language manually?
Posted by James Mitchell <jm...@telocity.com>.
> -----Original Message-----
> From: Stefan.Landro@swisscom.com [mailto:Stefan.Landro@swisscom.com]
> Sent: Friday, October 25, 2002 7:34 AM
> To: struts-user@jakarta.apache.org
> Subject: Internationalization - user setting the language manually?
>
>
> Hi there!
>
> I find the internationalisation feature of struts real nice, but there
> is something that is bothering me. What if a browser doesn't have a
> language setting,
The Struts framework checks for messages in this order:
1. The actual locale (e.g. en_US)
2. Subsets of #1 (e.g. en)
3. Server's default local (your servers locale as define by OS)
4. The default local (default being '' <- that's an empty string)
> or if the user wants to change to a particular
> language just for this one application? On most web-sites the user is
> able to set the language himself (clicking on a flag or something), and
> I was wondering if this is something that can be/is integrated in
> struts? (setting an additional request parameter or something)
see post by Gemes Tibor (same thread)
>
> Regards,
>
> Stef.
>
James Mitchell
Software Engineer/Struts Evangelist
http://www.open-tools.org
"Only two things are infinite, the universe and human stupidity, and I'm not
sure about the former."
- Albert Einstein (1879-1955)
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>