php 语言包的实现

1、如何设置各类语言包切换方法

在language目录中新建Zn.php En.php

编辑php文件定义变量,前段引用

$_LANG['wellcome']= '欢迎您加入';

$_LANG['add']= '增加';

在前段引入时使用:require WEB_ROOT.'/language/lang.php';

$data = array(

'name' => $_LANG['wellcome'],

);

posted @ 2015-10-16 15:39  monster13  阅读(1642)  评论(0编辑  收藏  举报