经常用到,这里记录下
打开includds/init.php 粘贴代码到200行左右if (!defined(‘INIT_NO_USERS’)) 上面
if(!empty($_REQUEST['lang'])){
$_SESSION['lang']=$_REQUEST['lang'];
}
if (!empty($_SESSION['lang']))
{
switch($_SESSION['lang']){
case ‘zh_cn’:
$_CFG['lang']=”zh_cn”;
break;
case ‘zh_tw’:
$_CFG['lang']=”zh_tw”;
break;
case ‘en_us’:
$_CFG['lang']=”en_us”;
break;
}
}
require(ROOT_PATH . ‘languages/’ . $_CFG['lang'] . ‘/common.php’);
$smarty->assign(‘lang’, $_LANG);
删除原
require(ROOT_PATH . ‘languages/’ . $_CFG['lang'] . ‘/common.php’);
$smarty->assign(‘lang’, $_LANG);
页面调用
简体
繁体
英文
时间: 2024-10-23 10:41:45