Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Language config
  • 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 ?
  • Please remove the post, for switch to another localization it was just needed to do : \Lang::set_lang('fr', true); 
    thanks
  • Harro VertonHarro Verton
    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. ;-)
  • Perfect, I understood the process now, fuel is great :) Thanks

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion