struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Micael <caraun...@harbornet.com>
Subject RE: Localisation
Date Thu, 06 Mar 2003 09:32:38 GMT
This is effectively unreadable in my email.

At 06:06 PM 3/5/03 +0000, you wrote:

>This what I did:
>
>++++++++++++++ In the homepage page:
><%
>pageContext.setAttribute("URLPath", request.getRequestURL());
>%>
>
>++++++++++++++ or ++++++++++++++ In Struts Config: ++++++++++++++ In the 
>SetLocaleAction: String language = httpServletRequest.getParameter("lg"); 
>String urlInput = httpServletRequest.getParameter("url"); Locale locale = 
>(Locale) httpServletRequest.getSession().getAttribute(org. 
>apache.struts.Globals.LOCALE_KEY); 
>httpServletRequest.getSession(true).setAttribute( 
>org.apache.struts.Globals.LOCALE_KEY, new Locale(language)); Locale 
>newlocale = (Locale) httpServletRequest.getSession().getAttribute(org. 
>apache.struts.Globals.LOCALE_KEY); int index = 
>urlInput.indexOf(httpServletRequest.getContextPath()) + 
>httpServletRequest.getContextPath().length(); return (new ActionForward( 
>urlInput.substring(index), true)); -----Original Message----- > From: 
>James [mailto:JamesPrance@hotmail.com] > Sent: 05 March 2003 20:28 > To: 
>struts-user@jakarta.apache.org > Subject: Re: Localisation > > i'm not 
>sure at the moment our current ' work around' is to only display > the > 
>flags on the 'home' page which can be accessed via the menu. This way no > 
>data entry is lost.. > > but i would prefer a way of doing it from any 
>page and returning to the > same > page, preferably with no data entry 
>loss (or validation).. > > > > > "Konstantina Stamopoulou" wrote in 
>message > news:00ee01c2e30d$b2d579d0$412c7c92@intranet.gr... > > > > >
> > 
>You could set a group of forwards up, based on the locale 
>ie > > > > > > > > > > > > > > >within >
> > > > > Does this mean that 
>someone has to implement a different .jsp for each > > language? I need to 
>implement something similar and I'm not sure that I > > understand the 
>answer. Don't you use the to display text > in > > different languages? 
>I'm I missing something here? > > James what is exactly the solution you 
>are going to follow? > > > > > Cheers > > > > > > Simon
> > > > Thank you 
>in advance > > Konstantina > > > > > > > ----- Original Message

>----- > > > From: "James" > > > To: > > > Sent: Wednesday,
March 05, 2003 
>8:11 PM > > > Subject: Localisation > > > > > > > > >
> I have a 
>LocaleActionClass that sets the locale according to which > wee > > > 
>flag > > > > the user clicks, my question is how in the struts-config.xml

>do i > > specify > > > it > > > > to forward to the page they
changed 
>locale on (i.e their original > page). > > > > > > > > 
>James > > > > > > > > > > > > > > > >
> > > > > > > > 
>-------------------------------------------------------------------- > 
>- > > > > 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 > > > > > > > > > >
> 
>--------------------------------------------------------------------- > 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



LEGAL NOTICE

This electronic mail  transmission and any accompanying documents contain 
information belonging to the sender which may be confidential and legally 
privileged.  This information is intended only for the use of the 
individual or entity to whom this electronic mail transmission was sent as 
indicated above. If you are not the intended recipient, any disclosure, 
copying, distribution, or action taken in reliance on the contents of the 
information contained in this transmission is strictly prohibited.  If you 
have received this transmission in error, please delete the message.  Thank 
you  



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


Mime
View raw message