Hello,

As i understood probabaly you need to implement own LocalePicker and then  
register it in your web.xml.
This is sample code


public class MyLocalePicker implements LocalePicker {

        public Locale pickLocale(HttpServletRequest request) {
//here goes your code to detect locale based on cookie, session, request  
parameters etc etc
                return ...;
        }

        public String pickCharacterEncoding(HttpServletRequest request, Locale  
locale) {
                return "UTF-8";
        }

        public void init(Configuration configuration) throws Exception {
        }
}

>
> Hi everyone,
> its a noob question but something is getting me out of the correct path.
>
> I need to internationalize a page, the user will see an English or German
> phrase according to the language choosen by clicking a flag: he clicks a
> flag, my UserData bean fills its "choosenlocale" field with the selected
> Locale and the jsp renders itself in the correct language... beautiful  
> but
> it doesnt work.
>
> The problem is that Stripes tags pick the locale in this way:
> Locale locale = getPageContext().getRequest().getLocale();
> (line 250 of InputTagSupport.java) -  regardless of the Locale stored in  
> my
> UserData bean.
>
> Now, i know that it is something about LocalePicker, but i cant really
> understand what to do to with this.
>
> I wrote this in web.xml
>
> <init-param>
>     <param-name>LocalePicker.Locales</param-name>
>     <param-value>en,de</param-value>
> </init-param>
>
> and then hoped to get my bundles (StripesResources.properties and
> StripesResources_de.properties) work... nothing changes, English shown
> everytime since my browser sends "en" as lang...
>
> please help me
> ty in advance
>
> mirko
>
>
>
>
>
>


-- 
Regards,
Evgeny Shepelyuk


------------------------------------------------------------------------------
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