Changeset 182
- Timestamp:
- 09/19/2006 02:27:22 AM (7 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 2 modified
-
admin/common.php (modified) (1 diff)
-
coverager/common-zh-simplified-gb2312.lang.php (added)
-
coverager/common.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/common.php
r181 r182 3 3 function get_language_file_ex($name, $l, $s) 4 4 { 5 static $ map = array(5 static $lmap = array( 6 6 'zh' => 'zh-simplified', 7 7 'zh-hk' => 'zh-traditional', 8 8 'zh-tw' => 'zh-traditional', 9 9 ); 10 static $smap = array( 11 'gbk' => 'gb2312', 12 'gb18030' => 'gb2312', 13 ); 10 14 11 if (isset($ map[$l])) {12 $l = $ map[$l];15 if (isset($lmap[$l])) { 16 $l = $lmap[$l]; 13 17 } 14 18 if (file_exists($file = "$name-$l-$s.lang.php")) { 15 19 return $file; 20 } 21 if (isset($smap[$s])) { 22 $s = $smap[$s]; 23 if (file_exists($file = "$name-$l-$s.lang.php")) { 24 return $file; 25 } 16 26 } 17 27 if (file_exists($file = "$name-$l.lang.php")) { -
trunk/coverager/common.php
r181 r182 3 3 function get_language_file_ex($name, $l, $s) 4 4 { 5 static $ map = array(5 static $lmap = array( 6 6 'zh' => 'zh-simplified', 7 7 'zh-hk' => 'zh-traditional', 8 8 'zh-tw' => 'zh-traditional', 9 9 ); 10 static $smap = array( 11 'gbk' => 'gb2312', 12 'gb18030' => 'gb2312', 13 ); 10 14 11 if (isset($ map[$l])) {12 $l = $ map[$l];15 if (isset($lmap[$l])) { 16 $l = $lmap[$l]; 13 17 } 14 18 if (file_exists($file = "$name-$l-$s.lang.php")) { 15 19 return $file; 20 } 21 if (isset($smap[$s])) { 22 $s = $smap[$s]; 23 if (file_exists($file = "$name-$l-$s.lang.php")) { 24 return $file; 25 } 16 26 } 17 27 if (file_exists($file = "$name-$l.lang.php")) {

