translate:validate command helps you maintain quality and completeness of your translations by checking for missing keys across all language files.
Basic Usage
Run the validation command to check all language files:Example Output
Here’s what you’ll see when running the validation command:Validation Output Modes
Standard Mode (Default)
By default, validation shows a summary table of all domains:- ✔ (green checkmark) for complete translations
- Number in red for the count of missing keys
- ”–” in red for completely missing files
Verbose Mode
Use the--verbose or -v flag for detailed output with missing key tables:
- Each domain being checked
- Each language being validated
- Detailed tables of missing keys with their source values
- Success messages for complete translations
Validate Specific Files
Check only specific language files using the--name option:
Validate Specific Languages
Check specific target languages only:Change Source Language
By default, validation uses your application’s locale as the source language. Override this with--base-language:
Custom Language Directory
If your translations are in a non-standard location, use the--lang-dir option:
This is useful for packages or applications with custom translation file locations.
Combining Options
Combine options for targeted validation:- Only validate the
authlanguage file - Only check French and Spanish translations
- Show detailed output with missing key tables
Workflow Integration
Pre-Deployment Checks
Add validation to your CI/CD pipeline to ensure translation completeness:Regular Maintenance
Run validation regularly to catch missing translations early:Understanding the Output
Complete Translations
When a language file is fully translated, you’ll see:Missing Translations
When keys are missing, the output shows:- The domain and language affected
- A table with the missing key names
- The source language values for reference
Missing Files
If an entire language file doesn’t exist, it will be marked with ”–” in the summary table.Next Steps
Translate Files
Generate missing translations with AI
Interactive Mode
Refine translations interactively