yii2 Method to set the error message language: first find and open the configuration file; then write the statement "'language'=>'zh-CN','timeZone'=>'Asia/Shanghai' ,"; finally save the changes.
Yii2 verification error message changed to global Chinese
Recommended: "yii tutorial"
Configuration file writing
'language'=>'zh-CN', 'timeZone'=>'Asia/Shanghai',
The above is the detailed content of How to set error message language in yii2. For more information, please follow other related articles on the PHP Chinese website!