struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jim Barrows" <>
Subject RE: I8N - Locale switch on any page
Date Tue, 04 Jan 2005 17:05:30 GMT

> -----Original Message-----
> From: Ritchie Warsito []
> Sent: Tuesday, January 04, 2005 4:36 AM
> To: Struts Users Mailing List
> Subject: I8N - Locale switch on any page
> Hey there,
> I'm studying the struts-mailreader example and as some of you 
> might know 
> (I hope), you have the option to switch languages (different 
> ApplicationResources).
> The thing is, and I've read this on many other sites that this is the 
> common way to do it, is that the locale options are only on the first 
> (welcome) page, and from there on the selected locale will be used.
> I want these options on every page throughout my application and when 
> selecting, it will return to the page where you selected it 
> from. With 
> PHP i know how to do this, but this whole JSP/Struts is new for me.
> So is this possible and more importantly how?

Of course it's possible. JSP/Struts is more capable then PHP.  Question is why?  Most browsers
provide locale, which struts uses to do the i18n for you.  Much easier.  See Java's I18N tutorial,
and Struts/JSTL I18N tutorial for details.
In answer to your question.. how did you do it in PHP?  probably some sort of link and back
to the page.  You could create a link with the current page as a parameter.  The action would
set the locale chosen, and return to the parameter.  

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message