CC-4810: Add language setting to login page
-done
This commit is contained in:
parent
7866b8a0cb
commit
1572955d07
9 changed files with 49 additions and 16 deletions
|
@ -14,4 +14,22 @@ class Application_Model_Locale
|
|||
|
||||
return $out;
|
||||
}
|
||||
}
|
||||
|
||||
public static function configureLocalization($locale = null)
|
||||
{
|
||||
$codeset = 'UTF-8';
|
||||
if (is_null($locale)) {
|
||||
$lang = Application_Model_Preference::GetLocale().'.'.$codeset;
|
||||
} else {
|
||||
$lang = $locale.'.'.$codeset;
|
||||
}
|
||||
putenv("LC_ALL=$lang");
|
||||
putenv("LANG=$lang");
|
||||
$res = setlocale(LC_MESSAGES, $lang);
|
||||
|
||||
$domain = 'airtime';
|
||||
bindtextdomain($domain, '/usr/share/airtime/locale');
|
||||
textdomain($domain);
|
||||
bind_textdomain_codeset($domain, $codeset);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue