1、打开includes/init.php找到下面两行代码并删除
require(ROOT_PATH . 'languages/' . $_CFG['lang'] . '/common.php'); $smarty->assign('lang', $_LANG);
2、找到
if ((DEBUG_MODE & 1) == 1)
3、在上面的代码上面加入以下代码
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);
4、在page_header.lbi文件中加入
<a href="?lang=zh_cn">简体</a><a href="?lang=zh_tw">繁体</a><a href="?lang=en_us">英文</a>