Looking to hire Laravel developers? Try LaraJobs

laravel-translation-audit maintained by simonecerruti

Description
Audit your app for missing or unused translations.
Author
Last update
2026/10/01 00:46 (dev-main)
License
Downloads
4

Comments
comments powered by Disqus

Audit your app for missing or unused translations.

Laravel Translation Audit scans your PHP files and Blade views for translation calls such as __(), trans(), trans_choice(), @lang, and Lang::get(). It then checks that every key it finds has a translation in each of your app's locales. The locales are detected automatically from your lang folder, or you can list them in the config file.

Installation

You can install the package via Composer:

composer require simonecerruti/laravel-translation-audit

You may publish all of the package's resources at once:

php artisan vendor:publish --tag="laravel-translation-audit"

Or, you may publish each resource individually:

Publishing the Configuration File

php artisan vendor:publish --tag="laravel-translation-audit-config"

Publishing the GitHub Workflow

php artisan vendor:publish --tag="laravel-translation-audit-workflow"

The workflow is published to .github/workflows/audit-translations.yml and runs the audit on every push to main and on every pull request.

Usage

php artisan translation:audit

The command exits with a non-zero status code when it finds missing translations, so it can be used to fail a CI pipeline.

Symbolic links are not followed by default. Pass --follow-links to scan the files behind them as well:

php artisan translation:audit --follow-links

The links matching the ignore_links glob patterns in the config file, vendor and node_modules by default, are never followed.

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Thank you for considering contributing to Laravel Translation Audit! Please review our contributing guide to get started.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

Laravel Translation Audit is open-sourced software licensed under the MIT license.