Multi Language help - out data from db

Hi all, i have Multi Language website. Like this

$lang['TICKETS_CUR_RUB'] = 'rub';
$lang['TICKETS_CUR_NIS'] = 'nis';
$lang['TICKETS_CUR_USD'] = 'usd';
$lang['TICKETS_CUR_EUR'] = 'eur';

Now, i need insert info to database like this

{$lang['SOME']} 20 {$lang['TICKETS_CUR_EUR']} {$lang['SOMEINFO']}

And when user change the language, the text will stay text, but in another lang.

How to do that? (And i add → global $lang but not work)

I would recommend that you look into Gettext (http://en.wikipedia.org/wiki/Gettext). Using this will make working with multilingual websites much easier.

Though, adding this to your website might take some time, so if you are in a time crunch you can do a small update and your current system should work.

Instead of using TICKETS_CUR_RUB, use TICKETS_CURRENCY for example, then each language will contain the correct currency to display, i.e. Russian will contain rub etc.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.