芝麻web文件管理V1.00
编辑当前文件:/home/p/r/i/prismawe/clients/canaldegap.fr/admin/lang.php
config['locale']) && $gCms->config['locale'] != '') { $current_language = $gCms->config['locale']; } else { #No, take a stab at figuring out the default language... #Figure out default language and set it if it exists if (isset($_SERVER["HTTP_ACCEPT_LANGUAGE"])) { $alllang = $_SERVER["HTTP_ACCEPT_LANGUAGE"]; if (strpos($alllang, ";") !== FALSE) $alllang = substr($alllang,0,strpos($alllang, ";")); $langs = explode(",", $alllang); foreach ($langs as $onelang) { #Check to see if lang exists... if (isset($nls['language'][$onelang])) { $current_language = $onelang; setcookie("cms_language", $onelang); break; } #Check to see if alias exists... if (isset($nls['alias'][$onelang])) { $alias = $nls['alias'][$onelang]; if (isset($nls['language'][$alias])) { $current_language = $alias; setcookie("cms_language", $alias); break; } } } } } } #First load the english one so that we have strings to fall back on @include(dirname(__FILE__) . DIRECTORY_SEPARATOR . "lang" . DIRECTORY_SEPARATOR . 'en_US' . DIRECTORY_SEPARATOR . "admin.inc.php"); #Now load the real file if ($current_language != 'en_US') { $file = dirname(__FILE__) . "/lang/ext/" . $current_language . "/admin.inc.php"; if (!is_file($file)) { $file = dirname(__FILE__) . "/lang/" . $current_language . "/admin.inc.php"; } if (is_file($file) && strlen($current_language) == 5 && strpos($current_language, ".") === false) { include ($file); } } # # and override it, if desired # $ofile = dirname(__FILE__) . DIRECTORY_SEPARATOR . "custom" . DIRECTORY_SEPARATOR . "lang" . DIRECTORY_SEPARATOR . $current_language . DIRECTORY_SEPARATOR . "admin.inc.php"; if (is_file($ofile)) { include ($ofile); } $nls['direction'] = (isset($nls['direction']) && $nls['direction'] == 'rtl') ? 'rtl' : 'ltr'; global $gCms; $gCms->nls = $nls; $gCms->current_language = $current_language; } # vim:ts=4 sw=4 noet ?>