I18n changed
git-svn-id: svn+ssh://code.netmonsters.ru/svn/majestic/branches/evo@151 4cb57b5f-5bbd-dd11-951b-001d605cbbc5
This commit is contained in:
@ -49,12 +49,16 @@ class I18N
|
||||
self::$lang = Env::Cookie('lang', self::getAcceptLanguage());
|
||||
self::setLang(self::$lang);
|
||||
self::$locale = self::$locales[self::$lang];
|
||||
|
||||
putenv('LANG=' . self::$locale);
|
||||
setlocale(LC_ALL, self::$locale . '.UTF-8');
|
||||
self::initForLocale(self::$locale);
|
||||
}
|
||||
|
||||
static public function initForLocale($locale)
|
||||
{
|
||||
putenv('LANG=' . $locale);
|
||||
setlocale(LC_ALL, $locale . '.UTF-8');
|
||||
bindtextdomain(self::$domain, PATH . '/' . APP . '/src/i18n/');
|
||||
textdomain(self::$domain);
|
||||
bind_textdomain_codeset(self::$domain, 'UTF-8');
|
||||
bind_textdomain_codeset(self::$domain, 'UTF-8');
|
||||
}
|
||||
|
||||
static protected function getAcceptLanguage()
|
||||
|
Reference in New Issue
Block a user