Re: [t5] Localisation

2007-10-21 Thread Christoph Jaeger
Thanks, this was what I was looking for. Best Regards, Christoph Imants Firsts wrote: > How about this? > > @Inject private PersistentLocale persistentLocale; > @Inject private RequestGlobals requestGlobals; > > public Locale getCurrentLocale() { > Locale locale = persistentLocale.get()

Re: [t5] Localisation

2007-10-21 Thread Imants Firsts
How about this? @Inject private PersistentLocale persistentLocale; @Inject private RequestGlobals requestGlobals; public Locale getCurrentLocale() { Locale locale = persistentLocale.get(); return locale != null ? locale : requestGlobals.getRequest().getLocale(); } Quoting Christ

[t5] Localisation

2007-10-21 Thread Christoph Jaeger
Hi, I use PersistentLocale to switch my pages to different languages. It works great. I have several links on the top of the page, each one switching to a different language. When a user clicks "DE", he will get the German version. I also want to show the user which language is currently selected