setLocale() doesn't change the language set by browser |
Thank your eelisland!
I was calling service('language')->setLocale('currentLocale) just before calling the views, but that didn't work when the view has a link to another page. Your solution is much more elegant works all the time! My only concern with your solution is that I am setting the locale at each method call, which is not necessary most of the time... I just do not understand why there is not a way to set the current locale once for all, and why it gets reset all the time to the default or negotiated one. I used to work with CakePHP and setting it once was enough. |
Welcome Guest, Not a member yet? Register Sign In |