TL;DR
I built a Composer plugin to automatically validate translation files in multilingual TYPO3 (and other PHP projects). It catches common issues like missing keys, broken placeholders or invalid syntax. I’d love to hear how others handle translation quality in their workflows.
In multilingual TYPO3 projects (or really any PHP-based application), it’s not uncommon in my experience to run into issues with translation files — missing keys, inconsistent placeholders, or invalid syntax. Unfortunately I’ve run into these problems myself more than once. Even with good development workflows, some issues only surface late.
To improve this situation for myself, I built a small Composer plugin to validate all translation files within a project:
move-elevator/composer-translation-validator
How it works
Once installed, the plugin offers a command:
composer validate-translations ./Resources/Private/Language
It will scan all translation files (JSON, YAML, PHP, XLIFF) in your project and validate them using a set of rules. Some of the things it currently checks for:
- Duplicate translation keys
- Missing or empty values
- Mismatched or broken placeholders (like %username%)
- Invalid syntax
- Key conflicts across multiple files
- Inconsistent use of placeholder syntax or key formats
- and more …
It supports typical TYPO3 translation formats (e.g. XLIFF) as well as other frameworks like Symfony or Laravel (with JSON, YAML or PHP translation formats).
Why I built it
In my own projects, especially the larger multilingual ones, I noticed how easy it is to overlook translation issues. A missing key here, an unused string there, or the classic typo in a placeholder that breaks a view.
While external tools like Crowdin or Lokalise are great for managing translations in larger teams, I wanted something lightweight and developer-focused. Something I can run locally, commit-safe, and integrate into my CI pipelines.
What I’m asking the community
I’d be curious to hear:
- Are you facing similar problems with multilingual setups in TYPO3?
- Do you rely on any other tools or workflows to catch translation-related issues early?
- Would something like this be useful in your projects?
- Are there additional checks you’d find helpful?
I’m happy to take suggestions or feedback or even better: if you’ve got a validator idea, feel free to open a GitHub issue or PR.
Thanks so far!
Cheers,
Konrad