AriaieBOY
Posted on July 22, 2023
Laravel has localization tools that help you translate your applications into any language you want.
But by default, all the Laravel Lang files include the English language. And if your application needs other languages you must create and manage lang files for each language by yourself.
Right now that I am writing this article we have more than 1400 keys for each language in the Laravel-Lang package that includes Laravel and its first-party packages.
You can translate Laravel and its packages like Jetstream, Fortify, Cashier, etc into 78 Languages.
All you need to do is to install Laravel-lang/common packages using the command below:
composer require laravel-lang/common --dev
After that you can add any languages you want using the command below:
php artisan lang:add en de ro zh_CN lv
Laravel often introduces new localization keys to the lang files and the community might update the translations in the future you can update the added languages using the command below:
php artisan lang:update
You can translate missing keys or improve the translations and create a PR on the Laravel-Lang/lang and help improve this package.
Posted on July 22, 2023
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.