It is not the best solution to Implement the LovaleProvider and the 
getLocale() method:
Instead I wrote my own Interceptor that manual set the 
Locale "invocation.getInvocationContext().setLocale()".

Another thing that I do not understand is why in the default Interceptor 
stack the i18n intereceptor is called after the prepare interceptor. In 
the prepare() methode the Locale is not set, because the i18n interecptor 
is invoked later in the stack. I had to manualy regroup the defaultStack 
and swap the i18n and prepare interceptors. Maybe this should be 
re-arranged in the defaultStack?

Regards and thanks for all the help
Markus Stauffer



On Wednesday 17 October 2007 14.07:14 Dave Newton wrote:
> Have you tried overriding the getLocale() method of
> ActionSupport-derived classes?
>
> --- Markus Stauffer <[EMAIL PROTECTED]> wrote:
> > Dear All
> >
> > Consider the following scenario: The preferred
> > language of the user is
> > store in the database. I want to override any
> > struts2 i18n settings
> > when the user logs in. What is stored in the
> > database is of higher
> > priority than e.g. what the web browser sends in the
> > HTTP request
> > headers.
> >
> > How can I achieve my goal? I tried to override the
> > "request_locale"
> > and "locale" variables with my own Locale. But
> > unfortunately this is
> > not of a permanent nature for the users session.
> >
> > Any help is appreciated.
> >
> > Kind regards
> > --
> > Markus Stauffer
>
> ---------------------------------------------------------------------
>
> > To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > For additional commands, e-mail:
> > [EMAIL PROTECTED]
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to