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 <[email protected]> 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



Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to