Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Locale reverts back to en_US, while locale has been changed #44

Open
rutiger opened this issue Feb 27, 2020 · 0 comments
Open

Locale reverts back to en_US, while locale has been changed #44

rutiger opened this issue Feb 27, 2020 · 0 comments

Comments

@rutiger
Copy link

rutiger commented Feb 27, 2020

I am using Laravel 5.5.48 with nginx.

I have experienced this issue, all my configuration is correct following installation guide, I amb using gettext handler as stated in configuration.

'handler' => 'gettext',

For setting the locale I am using the expected function LaravelGettext::setLocale($locale) within a Middleware, which is loaded after start session. It sets locale correctly, and when I debug the Controller with LaravelGettext::getLocale() it returns the expected locale. However, it shows the page in en_US

LaravelGettext::setLocale($locale);
$gettextLocale = LaravelGettext::getLocale();

Above lines are used in my middleware, second line outputs the expected locale, but page still are not showing in the expected language, and everytime the show translations for en_US locale.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant