Discuz currentlang函数 获取网站语言版本
- //当前语言版本function currentlang() { $charset = strtoupper(CHARSET); if($charset == 'GBK') { return 'SC_GBK'; } elseif($charset == 'BIG5') { return 'TC_BIG5'; } elseif($charset == 'UTF-8') { global $_G; if($_G['config']['output']['language'] == 'zh_cn') { return 'SC_UTF8'; } elseif ($_G['config']['output']['language'] == 'zh_tw') { return 'TC_UTF8'; } } else { return ''; }}if(PHP_VERSION < '7.0.0') { function dpreg_replace($pattern, $replacement, $subject, $limit = -1, &$count) { return preg_replace($pattern, $replacement, $subject, $limit, $count); }} else { function dpreg_replace($pattern, $replacement, $subject, $limit = -1, &$count) { require_once libfile('function/preg'); return _dpreg_replace($pattern, $replacement, $subject, $limit, $count); }}