CC-1960: Internationalize Airtime / Support translations
-set locale based on user's preference
This commit is contained in:
parent
7a9f01458c
commit
993d3fda7b
|
@ -32,7 +32,9 @@ $front = Zend_Controller_Front::getInstance();
|
||||||
$front->registerPlugin(new RabbitMqPlugin());
|
$front->registerPlugin(new RabbitMqPlugin());
|
||||||
|
|
||||||
//localization configuration
|
//localization configuration
|
||||||
$lang = 'en_US.utf8';
|
$codeset = 'UTF-8';
|
||||||
|
$lang = Application_Model_Preference::GetLocale().'.'.$codeset;
|
||||||
|
|
||||||
putenv("LC_ALL=$lang");
|
putenv("LC_ALL=$lang");
|
||||||
putenv("LANG=$lang");
|
putenv("LANG=$lang");
|
||||||
$res = setlocale(LC_MESSAGES, $lang);
|
$res = setlocale(LC_MESSAGES, $lang);
|
||||||
|
@ -40,7 +42,7 @@ $res = setlocale(LC_MESSAGES, $lang);
|
||||||
$domain = 'airtime';
|
$domain = 'airtime';
|
||||||
bindtextdomain($domain, '/usr/share/airtime/locale');
|
bindtextdomain($domain, '/usr/share/airtime/locale');
|
||||||
textdomain($domain);
|
textdomain($domain);
|
||||||
bind_textdomain_codeset($domain,'UTF-8');
|
bind_textdomain_codeset($domain, $codeset);
|
||||||
|
|
||||||
|
|
||||||
/* The bootstrap class should only be used to initialize actions that return a view.
|
/* The bootstrap class should only be used to initialize actions that return a view.
|
||||||
|
|
Loading…
Reference in New Issue