Love Fuel?
Donate
About
Forums
Discussions
Login
FuelPHP Forums
Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
General
Language config
efx
August 2018
In my config I setup language to:
'language' => 'fr', // Default language
'language_fallback' => 'en',
All my app has local translation with lang/en/
app.php
and lang/fr/app.php.
When I do localization change from php :
\Config::set('language', 'en');
it doesn't work. (it work only if I change in hand from config file.
Is the 'language' should to be saved to config file ?
efx
August 2018
Please remove the post, for switch to another localization it was just needed to do : \Lang::set_lang('fr', true);
thanks
Harro
August 2018
Accepted Answer
To be complete, when you load the Lang class it loads it's config. So when you change the config afterwards, Lang doesn't see that change anymore. Hence the set_lang() method.
;-)
efx
August 2018
Perfect, I understood the process now, fuel is great
:)
Thanks
Add a Comment
Howdy, Stranger!
It looks like you're new here. If you want to get involved, click one of these buttons!
Sign In
Apply for Membership
Categories
All Discussions
5,088
General
↳ General
3,364
↳ Job Board
13
↳ Installation & Setup
214
Packages
↳ Oil
213
↳ Orm
700
↳ Auth
260
Development
↳ Tips and Tutorials
126
↳ Code share
145
↳ Applications
52
In this Discussion
efx
August 2018
Harro
August 2018