Maybe the setFixedLocale(Locale); could be implemented. Wicket should ignore any locale coming from the user and use the Locale passed here. This setting can be undo by calling setFixedLocale(null);

Now... I couldn't find any reference to IApplicationSettings.getDefaultLocale() in Wicket's Core. As Eelco said, it's not working anyway...

In somewhere that should be checking for the default locale in case no Locale can be getted from the user, the getFixedLocale() could be called too. And if it's not null, well... do what I said before. :)

This is needed because some applications aren't localized, and it's not necessary because some websites are regional (not world wide). And because of this, I must avoid Wicket from displaying messages in English/Japanese/Chinese or whatever computer the user (let's say some brazilian guy accessing my website from a Lan House in India) is using to gain access.

Regards,

On 5/11/06, Eelco Hillenius <[EMAIL PROTECTED]> wrote:
That might be the idea, but doesn't work either. It's always overriden
by ServletWebRequest.getLocale, which in case it can't make up the
locale from the request header, defaults to the server's locale -
which is not the locale that is set as the default for Wicket.

Eelco



On 5/11/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> no, the default locale is used when we cannot figure out what the user's
> local is afaik. since the browser is sending a locale that will be used.
>
> -Igor
>
>
>
> On 5/11/06, Bruno Borges < [EMAIL PROTECTED] > wrote:
> >
> > Shouldn't these calls override any locale the user is sending at the
> request (from the browser)?
> >
> >         getApplicationSettings().setDefaultLocale(new
> Locale("pt", "BR"));
> >         getResourceSettings().setDefaultLocale(new
> Locale("pt", "BR"));
> >
> > I still get english messages, that comes from Application.properties. My
> tought was that, overriding the default locale, I would get portuguese
> messages.
> >
> > Regards
> >
> >
> > --
> > Bruno Borges
> > [EMAIL PROTECTED]
> > Sun Certified Java Programmer for 1.4
> > Sun Certified Web Component Developer for 1.4
>
>


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmdlnk&kid0709&bid&3057&dat1642
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user



--
Bruno Borges
[EMAIL PROTECTED]
Sun Certified Java Programmer for 1.4
Sun Certified Web Component Developer for 1.4

Reply via email to