Make sure your laravel translations are checked and are included in all languages.
larswiegers/laravel-translations-checker is a Laravel package for make sure your laravel translations are checked and are included in all languages..
It currently has 256 GitHub stars and 530.530 downloads on Packagist (latest version v0.9.4).
Install it with composer require larswiegers/laravel-translations-checker.
Discover more Laravel packages by larswiegers
or browse all Laravel packages to compare alternatives.
Last updated

Ever feel that you are missing translations in some languages you support? Get users emailing you about weird strings on their screen?
Use the laravel translation checker and get direct feedback where and what translations you are missing!
You can install the package via composer:
composer require --dev larswiegers/laravel-translations-checker
Use the command below, it is that easy!
php artisan translations:check
Are your translations in a weird directory? use the --directory option like this:
php artisan translations:check --directory=resources/lang
Some packages have their own language files, it is probably smart to exclude them.
php artisan translations:check --excludedDirectories=lang/vendor
This option is also available as configuration option 'excluded_directories'.
For example:
'excluded_directories' => ['lang/vendor'],
This section provides instructions on how to exclude specific languages from being checked.
To exclude languages, follow these steps:
Open the project's configuration file.
Locate the translation-checker file.
Add the language codes of the languages you want to exclude to the exclude_languages field.
For example:
exclude_languages = ["en", "fr", "es"]
php artisan translations:check --excludedFileExtensions=php
This option is also available as configuration option 'excluded_file_extensions'.
The package supports both .php files and .json files for the translations.
translations:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.0'
extensions: mbstring, intl
ini-values: post_max_size=256M, max_execution_time=180
coverage: xdebug
tools: php-cs-fixer, phpunit
- name: Install Dependencies
run: composer install -q --no-interaction --no-scripts
- name: Run translations check
run: php artisan translations:check --excludedDirectories=vendor
The language nl (resources/lang/nl) is missing the file ( passwords.php )
Missing the translation with key: nl.passwords.reset
Missing the translation with key: nl.passwords.sent
Missing the translation with key: nl.passwords.throttled
Missing the translation with key: nl.passwords.token
Missing the translation with key: nl.passwords.user
composer test
Please see CHANGELOG for more information what has changed recently.
Please see CONTRIBUTING for details.
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.