I believe there's a gotcha where the default locale is set according to
the server's default, rather than the user's browser settings.

Here's an example of adding a drop-down box to select a language

<
http://www.mail-archive.com/struts-user@jakarta.apache.org/msg00999.html
 >

and another i18n example

<
http://www.mail-archive.com/struts-user@jakarta.apache.org/msg00974.html
 >


*********** REPLY SEPARATOR  ***********

On 1/16/2001 at 4:41 PM éric spérano wrote:

Hello everyone,

i'm a new struts user and i have a question about i18n.

i did two properties files, let's say:

com.myproject.ApplicationResources.properties            (english)
com.myproject.ApplicationResources_fr.properties        (french)

in my web.xml, i set the init-param "application" to
"com.myproject.ApplicationResources"

i load my servlet and the log says it has load my ResourceBundle
successfully.

but now, how can i associate a specific language to a HttpSession??

as an example, i used the logon.jsp shipped with the struts example..

i set my browser (ie 5) to select French as my "favorite" language, but

when i access the logon.jsp, it's always the english message that are
printed..
i added a print out out request.getLocale() in my jsp and it prints the

good locale, so my browser config is correct.

can someone please indicate me what is missing/wrong?


thanks a lot! and keep up the good work.



eric sperano
modesys informatique



Reply via email to