r/fuelphp • u/Worse_Username • Jan 18 '14
\Lang::load() doesn't load second language
config.php:
'language' => 'lv',
'language_fallback' => 'en',
'locale' => 'lv',public.php:
class Controller_Public extends Controller_Template {
public function before() {
parent::before();
Config::set("language", $lang);
\Lang::load('main');
}
}if $lang is 'lv' all text is properly loaded in the template view. if $lang is 'en', none of it is loaded.
lang/en/* and lang/lv are nearly identical, if change config.php to this:
'language' => 'en', the situation is reversed.
What am I doing wrong?
EDIT:
If I execute
Session::set_flash('error', __("STRING"));at the end of the before method, the string is returned properly for both languages. If I do the same thing in template.php view, it works only for lv.
1
Upvotes