Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.


Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

i18n problem... :/


2 Posts   1087 Views


16 May 2008 at 12:09am (Last edited: 16 May 2008 12:10am), Community Member, 8 Posts

hi again,
so i have another problem, this time with i18 translations. My default locale is lt_LT(setted in _config.php).
so then i add <% _t('veks_login', 'Prisijungti') %> to template it returns an error -
FATAL ERROR: - Locale file /lang/en_US.php should exist
At line 1252 in /home/veks/domains/
i added a line(1245) to i i18n.php :
if(empty($module)) $module = Director::baseFolder(); now it finds the locale file, then i added another file with Lithuanian locale - lt_LT.php with source:
i18n::include_locale_file('veks', 'lt_LT'); //my site code dir is veks

global $lang;

$lang['lt_LT'] = $lang['lt_LT'];
$lang['lt_LT']['veks_login'] = 'Prisijungti';
and putted it into site root in folder lang. same to en_EN.php, but nothing happens then switching languages.

Please help.


16 May 2008 at 2:03am Community Member, 8 Posts

So i found were the problem was. I was creating template in themes dir, then i moved all my templates to site dir all started to work, but were is a one bug - ?lang=other_lang not setting the locale(i18n::set_locale() not executing), thats why nothing happened, so i placed some if statments in page controler constructor and now all working fine.