Home > Article > PHP Framework > About Laravel form validation prompt setting multi-language
The following tutorial column from Laravel will introduce you to setting up multi-language Laravel form validation prompts. I hope it will be helpful to friends in need!
#The default form prompt is in English. We can install language packs to build a multi-language environment.
Select commands based on version
For Laravel 7.x : run composer require caouecs/laravel-lang:~6.0 For Laravel 6.x : run composer require caouecs/laravel-lang:~5.0 For Laravel 5.8 : run composer require caouecs/laravel-lang:~4.0 For Laravel 5.1-5.7 : run composer require caouecs/laravel-lang:~3.0 For Laravel 5 : run composer require caouecs/laravel-lang:~2.0
The extension includes most languages, and the language packs are located in the vendor/caouecs/larvel-lang/src directory.
Copy the language pack to the resources/lang directory as needed.
Modify the config/app.php configuration file
'locale' => 'zh-CN',
The above is the detailed content of About Laravel form validation prompt setting multi-language. For more information, please follow other related articles on the PHP Chinese website!