Skip to content

About

🌐 Composer plugin that validates translation files in your project.

Topics

Resources

Contributing

Stars

3 stars

Watchers

1 watching

Forks

Latest commit

Β 

History

831 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Composer Translation Validator icon

Composer Translation Validator

Coverage CGL Tests Supported PHP Versions

Missing keys, duplicate keys, mismatched placeholders and broken HTML in translation files surface at runtime, as raw key names on the page or as formatting errors. This tool finds them before they ship: it groups the language files of a project, compares them and reports the differences.

It runs as a Composer plugin (composer validate-translations) and as a standalone PHAR with a GitHub Action and a GitLab CI template. XLIFF, YAML, JSON and PHP files are supported.

✨ Features

πŸ”₯ Installation

Packagist Packagist Downloads

composer require --dev move-elevator/composer-translation-validator

Important

The plugin needs PHP 8.2 or higher and Composer 2.2 or higher. The standalone PHAR, the GitHub Action and the GitLab CI template need PHP 8.4.1 or higher, see the installation guide for details.

πŸš€ Quick start

composer validate-translations ./translations

The command detects the translation files in the directory, runs the default validators and exits with a non-zero code if it finds errors.

Console output of validate-translations with two mismatch errors

πŸ“š Documentation

Full documentation: move-elevator.github.io/composer-translation-validator

Topic What's inside
Getting started What the tool checks, installation paths (Composer, PHAR, GitHub Action, GitLab CI), first run
Configuration Config file formats, every option, per-validator settings
CLI reference Arguments, options, output formats and exit codes
Validators What each validator checks, with examples
File formats Supported formats and their parsing rules
File detection How language files are grouped into sets
Programmatic usage Calling the validator from PHP code

πŸ§‘β€πŸ’» Contributing

Please have a look at CONTRIBUTING.md.

⭐ License

This project is licensed under GNU General Public License 3.0 (or later).

About

🌐 Composer plugin that validates translation files in your project.

Topics

Resources

Contributing

Stars

3 stars

Watchers

1 watching

Forks

Releases

Used by

Contributors

Languages