21285 Posts in 5732 Topics by 2602 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 840 Views |
-
Problems adding new language File

5 September 2010 at 12:54am
Hi
I have problems creating a custom language File for my module. i followed the instruction from the i18n docs, but my translation file doesn't get loaded.
my module is called event and has a Layout called Event.ss. In there i call for example <% _t('INFORMATION','__TEST__') %>. in my language file i wrote:
global $lang;
$lang['en_US']['Event.ss']['INFORMATION'] = 'Event information';but it does not appear when i view my page. Also i can make syntax errors or var_dumps in the lang file without getting them displayed. Can anyone help me here?
i run silverstripe 2.4.1
Thanks alot,
webair
-
Re: Problems adding new language File

5 September 2010 at 11:46am
Removing ['Event.ss'] in the lang string should solve this.
-
Re: Problems adding new language File

9 September 2010 at 8:23pm Last edited: 9 September 2010 8:37pm
Thanks for the answer.
sadly it didn't worked. it seems like the language file from the module doesn't get loaded. but i don't know why...
best regards
webair[EDIT] here my config settings for the i18n and translatable
i18n::set_default_lang('de');
i18n::set_locale('de_CH');
i18n::$common_locales['fr_CH'] = array('French (Switzerland)', 'français (Suisse)');Translatable::set_default_locale('de_CH');
Translatable::set_allowed_locales(array('de_CH','en_US','fr_CH'));[EDIT]
| 840 Views | ||
|
Page:
1
|
Go to Top |


