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()
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