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
4153 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:
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
Latest Issues
Composer cannot install laravel
From 1970-01-01 08:00:00
0
0
0
Laravel Space/laravel-backup cannot be installed
From 1970-01-01 08:00:00
0
0
0
Laravel 5.1 Login laravel comes with it No more
From 1970-01-01 08:00:00
0
0
0
Why thinkphp has better performance than laravel?
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template