I want to use i18n in my Play-Application (Play 2.1, Scala). The chosen language is stored in the PLAY_LANG-Cookie, but unfortunately this cookie is httpOnly. That means I can't read its value in my JavaScript files.
I tried changing the httpOnly-Value in the application.conf, but it didn't work.
application.session.httpOnly=false
I haven't found anything on this yet, so I'd really appreciate some help!
you can pass it to your scala template in the samy way we do with session
@(implicit session:play.api.mvc.Session, lang:play.api.i18n.Lang)
now you can pass @lang.code to the javscript. does the same functianlity but by diffrent approach.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With