sertxudeveloper/laravel-translations-checker

Check Laravel translation files for missing keys, files, and empty values. Integrates with CI/CD pipelines.

Maintainers

Package info

github.com/sertxudeveloper/laravel-translations-checker

pkg:composer/sertxudeveloper/laravel-translations-checker

Statistics

Installs: 7

Dependents: 0

Suggesters: 0

Stars: 1

Open Issues: 0

v1.0.1 2026-04-27 16:00 UTC

This package is auto-updated.

Last update: 2026-04-28 16:26:30 UTC


README

Translations Checker

Laravel Translations Checker

Codecov Test coverage

Check Laravel translation files for missing translations. Based on the package LarsWiegers/laravel-translations-checker.

This package scans your Laravel translation files and reports:

  • Missing translation files across languages
  • Translation keys that exist in one language but not others
  • Empty or blank translation values

Requirements

This package requires PHP 8.2+ and Laravel 11.0+.

Installation

You can install the package via composer:

composer require sertxudeveloper/laravel-translations-checker

Usage

Run the check command to scan your translation files:

php artisan translations:check

By default, it checks the lang directory in your application. You can specify a different directory:

php artisan translations:check --directory=resources/lang

The command returns exit code 1 if any issues are found, making it suitable for CI/CD pipelines.

Example output

Missing translations:
- The language es (resources/lang/es) is missing the file (auth.php)
- es.validation.required

Empty translations:
- en.messages.welcome (empty value)

Using the Service

You can also use the underlying service in your own code:

use SertxuDeveloper\TranslationsChecker\Services\TranslationCheckerService;

$checker = app(TranslationCheckerService::class);
$result = $checker->check(resource_path('lang'));

$result['missingFiles'];        // Files missing in some languages
$result['missingTranslations']; // Keys missing in some languages
$result['emptyTranslations'];   // Keys with empty values

Testing

This package contains tests. Run them using:

composer test

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

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

Credits

License

The MIT License (MIT). Please see License File for more information.



Copyright © 2026 Sertxu Developer