PHPackages                             hricer/sync-translations - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Localization &amp; i18n](/categories/localization)
4. /
5. hricer/sync-translations

ActiveLibrary[Localization &amp; i18n](/categories/localization)

hricer/sync-translations
========================

Synchronize all translation files.

0.4.0(4mo ago)0613MITPHPPHP &gt;=8.1.0

Since Feb 23Pushed 4mo ago1 watchersCompare

[ Source](https://github.com/Hricer/SyncTranslations)[ Packagist](https://packagist.org/packages/hricer/sync-translations)[ RSS](/packages/hricer-sync-translations/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (7)Dependencies (3)Versions (10)Used By (0)

Sync Translation Files
======================

[](#sync-translation-files)

The command for synchronize all translation files according to one locale file. This will ensure that all translation files contain the same keys.

This allows the developer to manage only one language. Before deploy the application into production, the developer executes synchronization for other languages.

Usage
-----

[](#usage)

Imagine you made changes to the main locale file, e.g. `messages.en.yaml`:

```
common:
    yes: Yes
+   no: No
    actions:
        close: Close
-       send: Send
    toast:
        save: 'Successfully saved.'
```

Now you need synchronize all `messages.*.yaml` files by `messages.en.yaml` (add new or remove old lines). Type into the terminal:

```
$ php bin/console translation:sync en --domain=messages

```

OptionsDefaultDescription`--domain``*` (all)The translation domain name to synchronize.`--directory``translations`Directory with translation files.`--format``yaml`Only YAML supported.`--deepl``null`Optional DeepL API key for auto translation.The command will update all `messages.*.yaml` (exclude en).

For exmaple `message.cs.yaml` :

```
common:
    yes: Ano
+   no: No
    actions:
        close: Zavřít
-       send: Odeslat
    toast:
        save: 'Úspešně uloženo.'
```

You can use `--deepl` parameter for auto translate all new lines.

Install
-------

[](#install)

Step 1: Download the package

`$ composer require hricer/sync-translations --dev`

Step 2: Regist the Bundle

```
// bundles.php
return [
    // ...
    Hricer\SyncTranslations\SyncTranslationsBundle::class => ['dev' => true],
];
```

### Without Symfony Bundle system

[](#without-symfony-bundle-system)

Create a console application with translation:sync as its only command:

```
// bin/translation.php
use Symfony\Component\Console\Application;
use Hricer\SyncTranslations\Command\SyncTranslationCommand;

(new Application('translation/sync'))
    ->add(new SyncTranslationCommand())
    ->getApplication()
    ->setDefaultCommand('translation:sync', true)
    ->run();
```

###  Health Score

40

—

FairBetter than 88% of packages

Maintenance74

Regular maintenance activity

Popularity14

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~220 days

Recently: every ~314 days

Total

9

Last Release

140d ago

PHP version history (3 changes)0.1.0PHP &gt;=7.4

0.1.3PHP &gt;=7.4.0

0.3.0PHP &gt;=8.1.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/c885b7baac4e68d1bfbf357d0d860b178c938c3cf864a8f6153fc37e19da4c6c?d=identicon)[Hricer](/maintainers/Hricer)

---

Tags

diffsymfonytranslationyamlsynchronizedeepl

### Embed Badge

![Health badge](/badges/hricer-sync-translations/health.svg)

```
[![Health](https://phpackages.com/badges/hricer-sync-translations/health.svg)](https://phpackages.com/packages/hricer-sync-translations)
```

###  Alternatives

[willdurand/js-translation-bundle

A pretty nice way to expose your translation messages to your JavaScript.

58917.1M55](/packages/willdurand-js-translation-bundle)[lexik/translation-bundle

This bundle allows to import translation files content into the database and provide a GUI to edit translations.

4362.7M19](/packages/lexik-translation-bundle)[boxblinkracer/phpunuhi

Easy tool to work with translation files for validation, exports, imports and more.

83225.2k17](/packages/boxblinkracer-phpunuhi)[om/potrans

Command line tool for translate Gettext with Google Translator API or DeepL API

10515.0k4](/packages/om-potrans)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
