The Laravel Translations Checker package finds missing translations in the languages you support. Using this package is as easy as running an artisan CLI to check translations across all languages:
php artisan translations:check --excludedDirectories=vendorThe language nl (resources/lang/nl) is missing the file ( passwords.php )Missing the translation with key: nl.passwords.resetMissing the translation with key: nl.passwords.sentMissing the translation with key: nl.passwords.throttledMissing the translation with key: nl.passwords.tokenMissing the translation with key: nl.passwords.user
This package supports looking for translations in both
.json translation files. Also, the readme has a nice example of checking for missing translations in a GitHub action:
translations:runs-on: ubuntu-lateststeps:- uses: actions/checkout@v2- name: Setup PHPuses: shivammathur/setup-php@v2with:php-version: '8.0'extensions: mbstring, intlini-values: post_max_size=256M, max_execution_time=180coverage: xdebugtools: php-cs-fixer, phpunit- name: Install Dependenciesrun: composer install -q --no-interaction --no-scripts- name: Run translations checkrun: php artisan translations:check --excludedDirectories=vendor
Here's an example of the output after adding a new language (
es) to a new Laravel application:
Using this tool, you can quickly make sure you define translations for everything! To get started with this package, check out the README on GitHub at laravel-translations-checker.