Step one:
composer require overtrue/laravel-lang
Step two:
After successful installation, add the following line in the config/app.php file:
Illuminate\Translation\TranslationServiceProvider::class,
is replaced with:
Overtrue\LaravelLang\TranslationServiceProvider::class,
Step 3:
_config/app.php Modify
'locale' => 'zh-CN',
End of Chinese Language Pack Reference
Form validation error message is displayed in Chinese:
faker_locale = 'zh-CN'
Recommended: laravel tutorial
The above is the detailed content of How to introduce Chinese language pack in laravel. For more information, please follow other related articles on the PHP Chinese website!