YII2.0默认使用中文

修改config\web.php文件:

if (YII_ENV_DEV) {
    // configuration adjustments for 'dev' environment
    $config['bootstrap'][] = 'debug';
    $config['modules']['debug'] = 'yii\debug\Module';

    $config['bootstrap'][] = 'gii';
    $config['modules']['gii'] = 'yii\gii\Module';
    $config['language'] = 'zh-CN';  //增加此行,默认使用中文
}

 

posted @ 2014-12-01 17:59  王天泽博客  阅读(133)  评论(0编辑  收藏  举报