[Wicket-user] Matching default locale to browser's preferred locale

2007-03-20 Thread David Leangen
I can't seem to find any info on this, and I can't recall either how this is supposed to work. I want the locale of my app to match the client browser's default locale (unless changed explicitly, of course). What do I need to do to achieve this? Thanks!

Re: [Wicket-user] Matching default locale to browser's preferred locale

2007-03-20 Thread Johan Compagner
that should happen automatically already. johan On 3/20/07, David Leangen [EMAIL PROTECTED] wrote: I can't seem to find any info on this, and I can't recall either how this is supposed to work. I want the locale of my app to match the client browser's default locale (unless changed

Re: [Wicket-user] Matching default locale to browser's preferred locale

2007-03-20 Thread Johan Compagner
i don't see a getDefaultLocale on ApplicationSettings (which version do you use of wicket?) But setting a (default) locale like getSession().setLocale() then you will override the user locale with something that the server specifies. But the question is what doesn't work? What do you do with

Re: [Wicket-user] Matching default locale to browser's preferred locale

2007-03-20 Thread David Leangen
Thanks for your help! You helped us locate the source of the problem, though it's totally unrelated to wicket. We misunderstood how locales work. We were testing for: locale == Locale.JAPANESE When we should have been testing for: locale.getLanguage().equals( ja ) Cheers, Dave On

Re: [Wicket-user] Matching default locale to browser's preferred locale

2007-03-20 Thread Eelco Hillenius
Yes, you're right. Our problem occurs when we try to do some locale-related stuff, i.e.: Locale defaultLocale = Application.get().getApplicationSettings().getDefaultLocale(); getSession().setLocale(); ApplicationSettings#defaultLocale was removed a while ago as the default