diglabby/laravel-find-missing-translations

A console command to find missing translations for Laravel projects
19,459 8
Install
composer require diglabby/laravel-find-missing-translations
Latest Version:1.8.1
PHP:^8.3
Laravel:12 · 13
Older releases:5 – 11
License:MIT
Last Updated:Aug 4, 2026
Links: GitHub  ·  Packagist
Maintainer: alies-dev

Latest Version on Packagist Total Downloads Test Type coverage Psalm level

Find missing Laravel Translations

Artisan command to find missing translations. It takes a basic locale and finds missing keys/translations in other locales.

Package logo

Output example:

Output example

Installation

composer require diglabby/laravel-find-missing-translations --dev

The package requires PHP 8.3 or higher and Laravel 12 or 13. For Laravel 10 or 11 use ^1.6.

Usage

Use the application locale as base and the application lang path (lang/ since Laravel 9, resources/lang/ before that):

php artisan translations:missing

The command exits with code 1 when a locale is missing a key or a whole translation file, so it can gate a CI build.

You can specify a base locale:

php artisan translations:missing --base=es

You can specify a list of locales to check:

php artisan translations:missing --base=es --only=be,en

You can specify a list of locales to exclude:

php artisan translations:missing --base=es --exclude=fr,de

You can specify a relative or absolute path to the lang directory location:

php artisan translations:missing --dir=/my-custom-lang-dirname

The lang/vendor directory, where package translation overrides live, is skipped.

What is compared

Both translation formats:

  • PHP group files, lang/{locale}/{group}.php, including files in nested group directories such as lang/{locale}/admin/orders.php.
  • JSON string keyed files, lang/{locale}.json. They are compared only when the base locale has one, so projects that use PHP groups only see no difference.

A locale counts as declared when it has either a directory or a JSON file, and both formats are then expected of it. A locale with be.json but no be/ directory has translated none of the group keys, so the missing directory is reported, and the same holds the other way round. The base locale needs at least one of the two.

Contributing

Testing

composer test

Thanks

Inspired by VetonMuhaxhiri/Laravel-find-missing-translations

Related Packages

hyperf/translation

An independent translation component, forked by illuminate/translation.

2,395,154 7
jildertmiedema/translation-check

Checks if all translation items appear in all languages

783 1
bunta/translations

Translation trait

9 0
exolnet/laravel-translation-editor

Allow translation edition through the browser

42,759 6

Version History

Version Released PHP Laravel License
1.8.1 ^8.3 ^12.0 || ^13.0 MIT
1.8.0 ^8.3 ^12.0 || ^13.0 MIT
1.7.2 ^8.3 ^12.0 || ^13.0 MIT
1.7.1 ^8.3 ^12.0 || ^13.0 MIT
1.7.0 ^8.3 ^12.0 || ^13.0 MIT