Changeset 182 in svn for trunk/admin/common.php


Ignore:
Timestamp:
2006-09-19T02:27:22+02:00 (9 years ago)
Author:
Xuefer
Message:

recognize gb2312/gbk/gb18030 as gb2312. gb2312 lang file for coverager

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/common.php

    r181 r182  
    33function get_language_file_ex($name, $l, $s)
    44{
    5     static $map = array(
     5    static $lmap = array(
    66            'zh'    => 'zh-simplified',
    77            'zh-hk' => 'zh-traditional',
    88            'zh-tw' => 'zh-traditional',
    99            );
     10    static $smap = array(
     11            'gbk'     => 'gb2312',
     12            'gb18030' => 'gb2312',
     13            );
    1014
    11     if (isset($map[$l])) {
    12         $l = $map[$l];
     15    if (isset($lmap[$l])) {
     16        $l = $lmap[$l];
    1317    }
    1418    if (file_exists($file = "$name-$l-$s.lang.php")) {
    1519        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        }
    1626    }
    1727    if (file_exists($file = "$name-$l.lang.php")) {
Note: See TracChangeset for help on using the changeset viewer.