Description
Describe the bug
I've a LanguageFilter wiht method "before" to check session value and set current languange with method setLanguage($locale) in the codigniter request classs.
In debug toolbar the the laguage is correct but translations show incorrect language (when i use lang() always return default language translation).
the problem only happens when i've an lang() function call before the request()->setLocale($language) and static service language not update when run setLocale($locale) and return next translation with default locale.
The translation files are correct, if i change default language to english, showme "logout" twice :(
If i comment the first lang() then works as expected.
CodeIgniter 4 version
4.0.4
Affected module(s)
Language Helper
Language Service
Expected behavior, and steps to reproduce if appropriate
lang() function get correct translation after "setLocale" function.
Context
- OS: Centos
- Web server: Nginx
- PHP version: 7.4.10
Activity