Common
Installation
It is recommended to use this special package because it allows you to update very quickly all the necessary dependencies that ensure the localization of the application.
The compatibility table can be viewed here.
You can install the package using Composer:
composer require laravel-lang/common:^6.9
If you are using Laravel 10, you will need to manually specify the laravel-lang/lang package version to install:
composer require --dev laravel-lang/lang:^15.39.1:^14.0
Usage
Now you can update existing localizations using the lang:update console command:
php artisan lang:update
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 allows localization files to be automatically updated after dependency updates, rather than manually running the php artisan lang:update console command.
Compatibility
Laravel | PHP | Package | Dependencies | Status |
|---|---|---|---|---|
10*, 11, 12, 13 | 8.1, 8.2, 8.3, 8.4, 8.5 |
| Starter Kits 1, Models 1, Routes 1, Locales 2, Publisher 16, Lang 13-15, Actions 1, Attributes 2, HTTP Statuses 3, Locales 2, JSON Fallback 2, MoonShine 1 (admin v3) | supported * When used in Laravel 10, you need to manually specify the lang package version to install: |
10*, 11, 12 | 8.1, 8.2, 8.3, 8.4 |
| Models 1, Routes 1, Locales 2, Publisher 16, Lang 13-15, Actions 1, Attributes 2, HTTP Statuses 3, Locales 2, JSON Fallback 2, MoonShine 1 (admin v3) | not supported * When used in Laravel 10, you need to manually specify the lang package version to install: |
10*, 11 | 8.1, 8.2, 8.3, 8.4 |
| Models 1, Routes 1, Locales 2, Publisher 16, Lang 13-15, Actions 1, Attributes 2, HTTP Statuses 3, Locales 2, JSON Fallback 2 | not supported * When used in Laravel 10, you need to manually specify the lang package version to install: |
10 | 8.1, 8.2, 8.3 |
| Publisher 15, Lang 13, Actions 1, Attributes 2, HTTP Statuses 3, Locales 1 | not supported |
10 | 8.1, 8.2 |
| Publisher 14, Lang 13, Attributes 2, HTTP Statuses 3, Locales 1 | not supported |
8, 9, 10 | 8.1, 8.2 |
| Publisher 14, Lang 12, Attributes 2, HTTP Statuses 3 | not supported |
7, 8, 9 | 8.0, 8.1 |
| Publisher 13, Lang 10, Attributes 1, HTTP Statuses 2 | not supported |
7, 8, 9 | 7.3, 7.4, 8.0, 8.1 |
| Publisher 12, Lang 10, Attributes 1, HTTP Statuses 2 | not supported |