Re: wicket default locale
Hi Adrian You could do that but what he wants is to set a default locale, not a fixed-forever locale. When you set it in newSession, you get exactly that - a default locale which might get changed any time by the application. Matt Adrian Merrall wrote: I think the more common method is to override newSession in your application class to return your own session (that extends WebSession) and then in your own session class override getLocale(). Very happy to be corrected though. HTH, Adrian On Mon, Oct 5, 2009 at 10:59 PM, Gatos wrote: Hello, How to set a default locale for the application? It works for me, but I guess it should be more common: @Override public Session newSession(Request request, Response response) { Session session = super.newSession(request, response); session.setLocale(new Locale("et")); return session; } Thank you smime.p7s Description: S/MIME Cryptographic Signature
Re: wicket default locale
I think the more common method is to override newSession in your application class to return your own session (that extends WebSession) and then in your own session class override getLocale(). Very happy to be corrected though. HTH, Adrian On Mon, Oct 5, 2009 at 10:59 PM, Gatos wrote: > Hello, > > How to set a default locale for the application? > > > It works for me, but I guess it should be more common: > @Override > public Session newSession(Request request, Response response) > { > Session session = super.newSession(request, response); > session.setLocale(new Locale("et")); > return session; > } > > > > Thank you >
Re: wicket default locale
Hi The default implementation pulls the used locale from the servlet request (meaning the requested locale by the browser). If you want to override that, we do it exactly as you do it. Matt Gatos wrote: Hello, How to set a default locale for the application? It works for me, but I guess it should be more common: @Override public Session newSession(Request request, Response response) { Session session = super.newSession(request, response); session.setLocale(new Locale("et")); return session; } Thank you smime.p7s Description: S/MIME Cryptographic Signature
wicket default locale
Hello, How to set a default locale for the application? It works for me, but I guess it should be more common: @Override public Session newSession(Request request, Response response) { Session session = super.newSession(request, response); session.setLocale(new Locale("et")); return session; } Thank you