コード例 #1
0
 /**
  * 向语言库加入新的语言翻译
  */
 public static function set()
 {
     $agrs = func_get_args();
     if (is_array($agrs[0])) {
         self::$tfConfig = array_merge(self::$sfLang, $agrs[0]);
     } elseif ($agrs[1]) {
         $keys = array_reverse(explode(".", $agrs[0]));
         $val = $agrs[1];
         foreach ($keys as $key) {
             $result = array();
             $result[$key] = $val;
             $val = $result;
         }
         self::$sfLang = array_merge(self::$sfLang, $result);
     }
 }