You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by joni santoso <st...@plasa.com> on 2003/02/05 06:00:22 UTC
Testing I18n.
Hi,
I am using Win2kServer using English version. I wanna test
the i18n support from struts. I want to create an app
using Chinese and German language. How to emulate it using
struts? I mean how to make struts to think that this
application runs on Chinese/German locale.
Regards,
===========================================================================================
Meriahkan Hari Kasih Sayang dengan mengirimkan Kartu Elektronik PlasaCom kepada kerabat dan teman yang Anda kasihi !
Kepada para pengguna TELKOMSave, lakukan pergantian kartu lama Anda segera ! http://www.telkomsave.com
===========================================================================================
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: Testing I18n.
Posted by Taylor Cowan <t....@charter.net>.
Struts can detect the client's prefered language by using the
"accept-languages" header value. You can do this on IE by selecting
Tools>Internet Options>Languages and choosing Chinese as your preferred
language.
Then from within an action you can retrieve the locale with
"getLocale(req)". Note that i18n in struts is different from swing in that
you must always tell the java.text and util classes which locale to use.
The default locale of the server may not be what the user wants. Is that
what you meant by
"make struts to think that this application runs on Chinese/German locale"?
Taylor Cowan
----- Original Message -----
From: "joni santoso" <st...@plasa.com>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Tuesday, February 04, 2003 9:00 PM
Subject: Testing I18n.
> Hi,
>
> I am using Win2kServer using English version. I wanna test
> the i18n support from struts. I want to create an app
> using Chinese and German language. How to emulate it using
> struts? I mean how to make struts to think that this
> application runs on Chinese/German locale.
>
> Regards,
>
>
>
============================================================================
===============
> Meriahkan Hari Kasih Sayang dengan mengirimkan Kartu Elektronik PlasaCom
kepada kerabat dan teman yang Anda kasihi !
> Kepada para pengguna TELKOMSave, lakukan pergantian kartu lama Anda segera
! http://www.telkomsave.com
>
============================================================================
===============
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org