Application translation files are auto loaded or not ? It's dummy question. Maybe i am missing something, being used to work with symfony/zend.
Just for test, i have a file located in app/lang/en/global.php , containing:
return array(
'names' => array(
'one' => 'One person',
'two' => 'Two persons'
)
);
In the controller or in twig (using twig as template engine), if i try to do Lang::get('names.one')
or lang('names.one') in twig, echoing / var_dump will always return null, UNTIL I MANUALLY LOAD the translation file with Lang::load('global.php').
If this is the normal approach of fuel to play with lang files, ok - i will adapt it to my needs. If it's a bug or something for the future, i would appreciate to know this.
* If i build a package, and i want to load the translation files, i will have to load the files from bootstrap . Ok. Not a big problem - actually a nice approach in order to avoid loading data that i don't need / use.