translations:check
The translations:check command is used to find missing translations in your project.
Usage
php artisan translations:check {target} [options]
Arguments
target: The target language for the translations
Options
--source: The source language used for the translation provider (default: ‘en’)--translate-missing: Translate missing translations using the translation service--sort: Sort JSON translation files
Description
This command checks for missing translations in the config source_paths files, and finds missing translations and add them accordingly. It can optionally translate missing entries and sort the JSON files.
When providing the --translate-missing option, the command will need a source language to translate the missing entries. This will generally be the primary language used in your application, defaulting to en.
Examples
- Check translations for French:
php artisan translations:check fr - Check translations for German, translating missing entries and sorting the file:
php artisan translations:check de --translate-missing --sort - Check translations for Spanish, using Italian as the source language:
php artisan translations:check es --source=itThe command will display the results, showing whether any missing translations were found and updated.