Hi Gerald,

I wrote a simple filter that looks for a custom request parameter (like
"language=xx") and then "overwrites" the Locale-setting of the request
(technically it just hides the original locale, so that getLocale() and
getLocales() return the values I want them to return). I did not look
for a Stripes-internal solution because I needed this for other
non-Stripes sites, too. If you're interested, I would send you the file.
But maybe there is a much better solution to solve this within Stripes.

Regards,
Marcus

Gerald Fiesser schrieb:
> Stripes is very intelligent setting the locale based on information in the
> request or the local configuration.
> I need to do something different. My app gets the locale as a parameter, so
> I need to be able to switch between languages programmatically.
>
> So far, the only way I see this can be done in Stripes is overriding
> StripesFilter and providing my own doFilter() method to set my own locale.
>
> Are there better ways to do this? I'm using 1.5.1.
>
> - Gerald
>   


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to