Auto-Detection
Automatically detects and groups related translation files based on naming conventions and directory structure.
A Composer plugin that validates XLIFF, YAML, JSON and PHP translation files for mismatches, duplicates, schema issues and more.
Install the plugin via Composer:
composer require --dev move-elevator/composer-translation-validatorValidate your translation files:
composer validate-translations ./translations
| Format | Extensions | Frameworks |
|---|---|---|
| XLIFF | .xlf, .xliff | TYPO3 CMS |
| YAML | .yaml, .yml | Symfony |
| JSON | .json | Laravel, Symfony |
| PHP | .php | Laravel, Symfony |
| Validator | Type | Description |
|---|---|---|
| MismatchValidator | ERROR | Finds missing translations between language files |
| DuplicateKeysValidator | ERROR | Catches duplicate keys within files |
| XliffSchemaValidator | ERROR | Validates XLIFF against XML schemas |
| DuplicateValuesValidator | WARNING | Finds identical translation values (opt-in) |
| EmptyValuesValidator | WARNING | Detects empty or whitespace-only values |
| PlaceholderConsistencyValidator | WARNING | Validates placeholder patterns |
| HtmlTagValidator | WARNING | Ensures HTML tag consistency across languages |
| EncodingValidator | WARNING | Validates UTF-8 encoding and Unicode issues |
| KeyCountValidator | WARNING | Warns when files exceed key threshold |
| KeyDepthValidator | WARNING | Warns about excessive nesting depth |
| KeyNamingConventionValidator | WARNING | Enforces key naming patterns |
See the Validators Reference for detailed documentation.