If you are using Apache + Mod-JK in front of your webapp, you can use mod_rewrite features to rewrite the HTTP headers and force the accepted language field to a value your application supports.
Otherwise you can simply create a class that extends WebPage, then override the getLocale() method and make all your page extend this class : @Override public Locale getLocale() { // TODO Implement a locale mapping and fallback return super.getLocale(); } 2009/10/16 Per Newgro <per.new...@gmx.ch> > > A solution would be to extract the accepted langauges myself from header > and set default > only if no supported locale is accepted by client-browser. But then i have > to (re)-implement > language extraction similiar to MockHttpServletRequest.getLocale(). But > this breaks the famous > "Don't repeat yourself" programmming rule :-). > > A much better approch would be to provide a list of supported locales in > application settings. > So the request could set in automatically and use Locale.getDefault() only > on last exit. > > What do you think? > Per > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >