veton-muhaxhiri / laravel-command-to-find-missing-translations
Response control for Laravel/Lumen 5 and up.
Installs: 4 264
Dependents: 0
Suggesters: 0
Security: 0
Stars: 22
Watchers: 2
Forks: 0
Open Issues: 1
Requires
- illuminate/support: ~5.6.34|~5.7.0|~5.8.0|^6.0|^7.0|^8.0
This package is auto-updated.
Last update: 2025-01-29 06:50:12 UTC
README
Laravel artisan command to list all your untranslated words.
Prerequisites
There is no prerequisites for this command to work, you just need to follow the installing process.
Installing
Installing this command is easy, you can use composer or do it manually :
Composer
composer require veton-muhaxhiri/laravel-command-to-find-missing-translations
By running composer command you will have everything setup and ready to be used.
Manually
- git clone the repository, or just download it.
- copy "src/Commands/FindMissingTranslations.php" file to /app/Console/Commands of your laravel project.
By completing this steps the command should work, unless the command is not loaded automaticly. To load the command go to app/Console/Kernel.php and add the class name to the $commands property.
protected $commands = [
Commands\FindMissingTranslations::class
];
Lumen
In Laravel Lumen we just need one extra step, go open bootstrap/app.php
file and register the service provider by adding the line
$app->register(VetonMuhaxhiri\Laravelfindmissingtranslations\Providers\FindMissingTranslationsProvider::class);
Running the command
The command expects two arguments :
- language directory - Relative path of language directory for ex. /resources/lang is a directory that contains all supported language in your laravel app.
- base language - Base language for ex. "en". All other languages are compared to this language.
While base language should be one of the language listed in the picture.
Example
$ php artisan translations:missing /resources/lang en
Features
Recursive
Detects missing words in multilevel array for ex.
Missing files
Detects missing files, for ex. if file with translation named "posts.php" exists in english but not in deutsch.
Authors
- Veton Muhaxhiri - LinkedIn