Access Dynamic Lang from template

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Access Dynamic Lang from template

omaru
Hi!,
I'm changing the language by using spring session locale resolver and it seems to be working fine, the thing here is that I want to read that variable directly from the html template but I don't seem to figure out how to do that.
Spring's documentation states that the language selected (regardless the used mechanism) is saved on RequestContext.language but I can't not access it.
Any help regarding this would be really appreciated it.

PD: I also tried to use request.locale but that gets read from the browser and doesn't change when the language changes in the app.
Reply | Threaded
Open this post in threaded view
|

Re: Access Dynamic Lang from template

Zemi
Administrator
Hi,

try #ctx.locale

Reply | Threaded
Open this post in threaded view
|

Re: Access Dynamic Lang from template

omaru
Thanks!!!! haha my bad , yeah it was also in the documentation :( such a dumb question of mine, thank you zemi :)