Home > PHP Framework > Laravel > How to introduce Chinese language pack in laravel

How to introduce Chinese language pack in laravel

藏色散人
Release: 2020-03-10 08:58:08
forward
4130 people have browsed it

How to introduce Chinese language pack in laravel

Step one:

composer require overtrue/laravel-lang
Copy after login

Step two:

After successful installation, add the following line in the config/app.php file:

Illuminate\Translation\TranslationServiceProvider::class,
Copy after login

is replaced with:

Overtrue\LaravelLang\TranslationServiceProvider::class,
Copy after login

Step 3:

_config/app.php Modify

'locale' => 'zh-CN',
Copy after login

End of Chinese Language Pack Reference

Form validation error message is displayed in Chinese:

faker_locale = 'zh-CN'
Copy after login

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!

Related labels:
source:segmentfault.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template