I try to set fallback locale dynamically through web using config set with the key of app.fallback_locale
. But its did not work.
config()->set('app.fallback_locale', 'ms')
Is there something I missing?
I try to set fallback locale dynamically through web using config set with the key of app.fallback_locale
. But its did not work.
config()->set('app.fallback_locale', 'ms')
Is there something I missing?
Try this:
Set fallback_locale
in app.php
,
'fallback_locale' => 'ms',
Try clearing your config cache, before accessing it
php artisan config:clear
You can try using php artisan tinker
and run
config('app.locale');
OR
App::getLocale()
Hope this works in your case!!