Example #1
0
 protected static function setupI18n()
 {
     Logging::log('Initializing i18n');
     if (!self::isCLI()) {
         $language = self::$_user instanceof User ? self::$_user->getLanguage() : Settings::getLanguage();
         if (self::$_user instanceof User && self::$_user->getLanguage() == 'sys') {
             $language = Settings::getLanguage();
         }
         Logging::log("Initializing i18n with language {$language}");
         self::$_i18n = new I18n($language);
         self::$_i18n->initialize();
     }
     Logging::log('done (initializing i18n)');
 }