struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Manfred Wolff <wo...@manfred-wolff.de>
Subject Re: how to dynamically internationalize login page
Date Wed, 13 Sep 2006 09:21:54 GMT

leo.

Please don't do so. In Struts you can do the language switching with the
locale Action. For this you have to provide several resources in the
java resourcebundle manner:

- provide a file for your message-ressource e.g. resources.properties
- provide a file for each language and name it
  resources_en.properties for english
  resources_de.properties for german
  resources_fr.properties for france etc.
- struts itsself fetches the right file. You have to do nothing else.

Download http://struts-ge-packt.de/download/code.zip for examples. Here
you can see how to deal with the most of the actions that are provided
with struts.

Manfred

Struts goes mobile: http://strutsme.org


leo mj wrote:
> hi all,
>
>  I think some fellow member has asked the same question.But I didn't find any reply for
the old thread.
>
> So i have a scenario
>
> I have a login page with 
>
>   1.Username
>   2.Password
>   3.Language
>
> Based on the language selected I have to reload the page.
>
> I have used internationalization techniques like ApplicationResources_de for german.But
this is a scenario where the language to be displayed is preconfigured using <message-resources>
in struts-config.xml.
>
> But dynamic selection of language,i feel can be done only if <message-resource parameter="ApplicationResources">
is modified using Action class.
>
> I have done the modification using SAX parser and FileWriter.But I need a more neat way
to do so.Is it possible???
>
> Regards,
> Leo
>
>
>
>
>  		
> ---------------------------------
> Stay in the know. Pulse on the new Yahoo.com.  Check it out. 
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message