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.

Archive /

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

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

i18n problem... :/

Go to End

2 Posts   1341 Views


Community Member, 8 Posts

16 May 2008 at 12:09am

Edited: 16/05/2008 12:10am

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.


Community Member, 8 Posts

16 May 2008 at 2:03am

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.