Browse Source

I18n changed

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

8
i18n/I18N.php

@ -49,9 +49,13 @@ class I18N
self::$lang = Env::Cookie('lang', self::getAcceptLanguage());
self::setLang(self::$lang);
self::$locale = self::$locales[self::$lang];
self::initForLocale(self::$locale);
}
putenv('LANG=' . self::$locale);
setlocale(LC_ALL, self::$locale . '.UTF-8');
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');

Loading…
Cancel
Save