Skip to content
Extended translation for Laravel 5
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Extended lang translations for Laravel 5.3+

Translation support for 69 languages.

lang translations

StyleCI Total Downloads Latest Stable Version Latest Unstable Version License


To get the latest version of Lang Translations Library, simply require the project using Composer:

composer require andrey-helldar/lang-translations

Instead, you may of course manually update your require block and run composer update if you so choose:

    "require": {
        "andrey-helldar/lang-translations": "^2.0"

For using package in the Laravel 5.3-5.5 (php >= 5.6.0 <=7.1.2), use ^1.0 version.

For using package in the Laravel 5.5-5.x (php >= 7.1.3), use ^2.0 version (default).

If you don't use auto-discovery, add the ServiceProvider to the providers array in config/app.php:




The package replaces only certain files in your lang directories:


// or    

He does not touch any other files.

When updating, the package reads your changes in the files and adds them to your own. This means that if you fill in the files yourself, the package will not remove anything from them.

Also, if you select a JSON file type, localization files will be automatically generated from existing translation files. JSON file will be sorted in alphabetical order.

Install translations

When executing the php artisan lang-translations:install command, need to pass a list of localizations as a parameters:

php artisan lang-translations:install en
php artisan lang-translations:install en de ru

If files do not exist in the destination folder, they will be created. And if the files exist, the console will ask you for a replacement.

Also, if the files exist and you do not want to agree each time, you can pass the attribute --force or its alias -f for forced replacement.

php artisan lang-translations:install en --force
php artisan lang-translations:install en -f

By default, php translation files are copied. If you want to install json-files, then use the --json key:

php artisan lang-translations:install en --json
php artisan lang-translations:install en -j

Update translations

When executing the php artisan lang-translations:update command, the package learns which localizations are installed in your application and will replace the matching files.

Command php artisan lang-translations:update is an alias of php artisan lang-translations:install {langs} --force.

And command for updating json files: php artisan lang-translations:update --json

Status of files

Check the TODO file to see the missing translations.

Copyright and License

Lang Translations was written by Andrey Helldar for the Laravel Framework 5.3 and later, and is released under the MIT License. See the LICENSE file for details.

You can’t perform that action at this time.