CC-1960: Internationalize Airtime / Support translations

-set locale based on user's preference
This commit is contained in:
denise 2012-11-21 16:41:54 -05:00
parent 7a9f01458c
commit 993d3fda7b
1 changed files with 4 additions and 2 deletions

View File

@ -32,7 +32,9 @@ $front = Zend_Controller_Front::getInstance();
$front->registerPlugin(new RabbitMqPlugin());
//localization configuration
$lang = 'en_US.utf8';
$codeset = 'UTF-8';
$lang = Application_Model_Preference::GetLocale().'.'.$codeset;
putenv("LC_ALL=$lang");
putenv("LANG=$lang");
$res = setlocale(LC_MESSAGES, $lang);
@ -40,7 +42,7 @@ $res = setlocale(LC_MESSAGES, $lang);
$domain = 'airtime';
bindtextdomain($domain, '/usr/share/airtime/locale');
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.