A fast CLI tool to find missing translation keys in your Laravel project. It scans your PHP and Blade files for translation function calls (__(), trans(), @lang()) and compares them against your language files.
- Scans
__(),trans(), and@lang()function calls - Automatically excludes common directories (vendor, node_modules, etc.)
- Custom directory exclusions
- Multi-locale support
- Cross-platform (Linux, macOS, Windows)
Download the appropriate binary for your system from the Releases page:
| Platform | Architecture | Binary |
|---|---|---|
| Linux | x64 | laravel-missing-translations-linux-amd64 |
| Linux | ARM64 | laravel-missing-translations-linux-arm64 |
| macOS | Intel | laravel-missing-translations-darwin-amd64 |
| macOS | Apple Silicon | laravel-missing-translations-darwin-arm64 |
| Windows | x64 | laravel-missing-translations-windows-amd64.exe |
| Windows | ARM64 | laravel-missing-translations-windows-arm64.exe |
Direct download (recommended):
# macOS Apple Silicon
curl -LO https://github.com/OthmanHaba/laravel-missing-translations/releases/latest/download/laravel-missing-translations-darwin-arm64
chmod +x laravel-missing-translations-darwin-arm64
sudo mv laravel-missing-translations-darwin-arm64 /usr/local/bin/laravel-missing-translations
# macOS Intel
curl -LO https://github.com/OthmanHaba/laravel-missing-translations/releases/latest/download/laravel-missing-translations-darwin-amd64
chmod +x laravel-missing-translations-darwin-amd64
sudo mv laravel-missing-translations-darwin-amd64 /usr/local/bin/laravel-missing-translations
# Linux x64
curl -LO https://github.com/OthmanHaba/laravel-missing-translations/releases/latest/download/laravel-missing-translations-linux-amd64
chmod +x laravel-missing-translations-linux-amd64
sudo mv laravel-missing-translations-linux-amd64 /usr/local/bin/laravel-missing-translationsOr using tar.gz:
curl -LO https://github.com/OthmanHaba/laravel-missing-translations/releases/latest/download/laravel-missing-translations-darwin-arm64.tar.gz
tar -xzf laravel-missing-translations-darwin-arm64.tar.gz
chmod +x laravel-missing-translations-darwin-arm64
sudo mv laravel-missing-translations-darwin-arm64 /usr/local/bin/laravel-missing-translations- Download the
.exefile - Add to your PATH or run directly from the download location
Requires Go 1.18+:
git clone https://github.com/OthmanHaba/laravel-missing-translations.git
cd laravel-missing-translations
make buildBinaries will be in the dist/ directory.
# Scan current directory with default locale (en)
laravel-missing-translations
# Specify Laravel project path
laravel-missing-translations -path /path/to/laravel/project
# Check a different locale
laravel-missing-translations -locale fr
# Exclude additional directories
laravel-missing-translations -exclude tests -exclude database
# Verbose output (shows loaded translation keys)
laravel-missing-translations -v
# Combine options
laravel-missing-translations -path ./my-app -locale es -exclude tests -v| Flag | Default | Description |
|---|---|---|
-path |
. |
Path to your Laravel project |
-locale |
en |
Locale to check against (e.g., en, fr, es) |
-exclude |
- | Additional directories to exclude (can be used multiple times) |
-v |
false |
Verbose output - shows all loaded translation keys |
The following directories are excluded by default:
vendornode_moduleslang.gitstoragebootstrap/cache
Loading translations from: lang/en
Loaded 150 translation keys
Scanning Laravel files...
Missing translation keys (3):
app/Http/Controllers/UserController.php:45 -> users.profile.title
resources/views/dashboard.blade.php:12 -> dashboard.welcome_message
resources/views/settings.blade.php:8 -> settings.notifications.email
0- No missing translations found1- Missing translations detected
This makes it easy to integrate into CI/CD pipelines:
# GitHub Actions example
- name: Check translations
run: ./laravel-missing-translations -path ./- Loads translations from
lang/{locale}/*.phpfiles - Parses PHP arrays including nested structures to build a complete key map
- Scans source files for translation calls:
__('key'),trans('key'),@lang('key') - Reports missing keys with file path and line number
MIT
