larswiegers/laravel-translations-checker
Find missing Laravel translations fast. Run php artisan translations:check to compare languages and see what keys are missing and where. Supports custom lang directories plus excluding vendor paths, specific languages, and file extensions for cleaner results.
Install the package as a dev dependency:
composer require --dev larswiegers/laravel-translations-checker
Run the check immediately:
php artisan translations:check
By default, it scans resources/lang and reports missing translations per language. The output is human-readable and highlights both missing files (e.g., passwords.php) and individual keys (e.g., nl.passwords.reset).
Start by running it locally during development, especially after adding new translations in your base language (usually en). Use the output to fill gaps in other languages before deployment.
php artisan translations:check --excludedDirectories=vendor to your GitHub Actions or GitLab CI pipeline to fail builds when translations are missing.php artisan vendor:publish --tag=translation-checker-config) and configure:
excluded_directories (e.g., ['lang/vendor'])exclude_languages (e.g., ['xx', 'zz'])excluded_file_extensions (e.g., ['csv', 'yaml'] if supported by your stack but not checked)husky + lint-staged to run a limited check (e.g., only changed language files) before committing new translation keys.--directory=src/Translations to point to non-standard paths.missing.php should not be deleted entirely.en-US ≠ en_us). Use ISO standard codes consistently across app.php and language directories.auth.failed vs auth.falied (typo) are both reported as missing — the tool doesn’t validate spelling, only presence.--excludedDirectories=...) override config file settings. Use config for project-wide defaults, CLI for one-off overrides.lang/en.json and lang/en/auth.json, but does not merge nested JSON structures across files — each file is validated independently.--verbose (though not documented, it helps trace file scanning) or temporarily enable logging via LOG_CHANNEL=single.--excludedFileExtensions — if you accidentally include .blade.php or .yml, the parser will fail or misreport.How can I help you explore Laravel packages today?