CI框架如何把错误提示改成中文?
CI框架如何把表单验证还有文件上传类的 错误提示改成中文显示呢?求教下载语言包 http://codeigniter.org.cn/forums/thread-11803-1-1.html CI语言包可以加个hook
/**
* 定义 Cier小站针对cier_lang 的 i18n 函数
* @example
* $author = __('ci_author');
* $ci_timestamp = __('ci_timestamp',array(':now' => date(config_item('log_date_format'))));
*/
if ( ! function_exists('__'))
{
function __($string, array $values = NULL, $lang = NULL)
{
$LANG =& load_class('Lang', 'core');
$LANG->load('cier');
$string = $LANG->line($string);
return empty($values) ? $string : strtr($string, $values);
}
}
/* End of file Common.php */
/* Location: ./system/core/Common.php */
//cier_lang.php
$lang['cier_author'] = 'billzhao';
$lang['cier_timestamp'] = '当前时间 :now';
Hex 发表于 2012-9-25 18:17
下载语言包 http://codeigniter.org.cn/forums/thread-11803-1-1.html
放到哪里?
user 发表于 2014-7-10 11:57
放到哪里?
放到 appliication/lanaguage/chinese 里,chinese 不喜欢可以改成其他目录名,然后在 application/config/config.php 里指定使用 chinese 语言即可,默认是 english。
已经ok了,谢谢
http://codeigniter.org.cn/forums/forum.php?mod=viewthread&tid=12185&extra=page%3D1 导入中文错误提示是乱码啊
页:
[1]