Browse Source

I18n changed

git-svn-id: svn+ssh://code.netmonsters.ru/svn/majestic/branches/evo@151 4cb57b5f-5bbd-dd11-951b-001d605cbbc5
master
pzinovkin 14 years ago
parent
commit
c3afc4d3dd
  1. 12
      i18n/I18N.php

12
i18n/I18N.php

@ -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()

Loading…
Cancel
Save