(07-27-2024, 09:02 AM)PhilInLoco Wrote: 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.
@
PhilInLoco Glad you find my post usefull.
The question in my previous post still remain, maybe some CI guru here could helpĀ
"If anyone know a better way, please advises".