Example #1
0
 /**
  * @brief  locale初始化
  */
 private static function _initLocale()
 {
     self::_loadConfCache();
     self::$_default_locale = self::$_conf_cache['default_locale'];
     if (empty(self::$_default_locale)) {
         self::_fatalErr("check \"default_locale\" in locale.conf, \"default_locale\" can't be empty!");
     }
     //support locale
     self::$_support_locale = self::$_conf_cache['valid_locales'];
     if (empty(self::$_support_locale)) {
         self::_fatalErr("check \"valid_locales\" in locale.conf, \"valid_locales\" can't empty!");
     }
     if (!in_array(self::$_default_locale, self::$_support_locale)) {
         self::_fatalErr("check \"default_locale\" in locale.conf, \"default_locale\" must be valid locale!");
     }
 }