Laravel Lang Help

Common

You can install the package via Composer:

composer require --dev laravel-lang/common

Now you can update existing or add new localizations using the lang:update console command:

php artisan lang:update

If in production you need to use a list of localizations through facades, you need to additionally install a dependency:

composer require laravel-lang/locales

We also recommend adding the call code to the post-update-cmd section of the scripts block in the composer.json file:

{ "scripts": { "post-update-cmd": [ "@php artisan vendor:publish --tag=laravel-assets --ansi --force", "@php artisan lang:update" ] } }

This will allow localization files to be automatically updated after dependency updates, rather than manually calling the php artisan lang:update console command.

Last modified: 16 February 2024