sinnbeck / laravel-langcheck
Find missing translations
Requires
- php: ^7.2
- illuminate/container: ^5.8|^6.0|^7.0|^8.0
- illuminate/contracts: ^5.8|^6.0|^7.0|^8.0
Requires (Dev)
- orchestra/testbench: ^3.8|^4.0|^5.0
- phpunit/phpunit: ^8.0|^9.0
README
Laravel LangCheck is created to help developers find missing translations in the lang directory of Laravel
Installation
$ composer require sinnbeck/laravel-langcheck --dev
Configuration
Laravel LangCheck will use the locale defined in laravel by default. It is possible to override with by publishing the config file.
$ php artisan vendor:publish --provider="Sinnbeck\LangCheck\LangCheckServiceProvider"
Usage
Laravel Lang Check is purely made to be used with artisan and currently has two commands available.
Find missing
$ php artisan langcheck:missing
Will render a table for each locale found with missing translations. The key is setup the same as when using the translations in laravel folder.key.key
It is possible to ensure that missing translations are caught, but passing the flag --throw
, to make the command throw an exception on missing translations.
Find superfluous
$ php artisan langcheck:super
Same as missing except it shows locales with extra translations that are most likely not in use anymore.
Todo
- Create/remove translations automatically?