Browse Source

htdocs: updated language

git-svn-id: svn://svn.lighttpd.net/xcache/trunk@1056 c26eb9a1-5813-0410-bd6c-c2e55f420ca7
3.0
Xuefer 9 years ago
parent
commit
1ff8f075ec
  1. 9
      htdocs/common/common-zh-simplified.lang.php
  2. 9
      htdocs/common/common-zh-traditional.lang.php
  3. 11
      htdocs/common/common.php

9
htdocs/common/common-zh-simplified.lang.php

@ -1,4 +1,11 @@
<?php
$strings = array();
$strings = array(
'Cacher'
=> '缓存器',
'Coverager'
=> '代码覆盖查看器',
''
=> '',
);

9
htdocs/common/common-zh-traditional.lang.php

@ -1,4 +1,11 @@
<?php
$strings = array();
$strings = array(
'Cacher'
=> '快取器',
'Coverager'
=> '代码覆盖查看器',
''
=> '',
);

11
htdocs/common/common.php

@ -66,6 +66,9 @@ function th($name, $attrs = null)
function xcache_validateFileName($name)
{
if (!preg_match('!^[a-zA-Z0-9._-]+$!', $name)) {
var_dump($name);
}
return preg_match('!^[a-zA-Z0-9._-]+$!', $name);
}
@ -80,8 +83,12 @@ function get_language_file_ex($name, $lang)
if (isset($langMap[$lang])) {
$lang = $langMap[$lang];
}
else if (!xcache_validateFileName($lang)) {
return null;
}
$file = "$name-$lang.lang.php";
if (xcache_validateFileName($file) && file_exists($file)) {
if (file_exists($file)) {
return $file;
}
return null;
@ -235,7 +242,7 @@ if (file_exists("./config.php")) {
include("./config.php");
}
include(get_language_file("common"));
include(get_language_file("../common/common"));
$modules = array();
if (file_exists("../cacher/index.php")) {

Loading…
Cancel
Save