PHPackages                             mmoreram/translation-server - 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. [DevOps &amp; Deployment](/categories/devops)
4. /
5. mmoreram/translation-server

ActiveLibrary[DevOps &amp; Deployment](/categories/devops)

mmoreram/translation-server
===========================

PHP translation server

v1.2.0(9y ago)233.7k2[1 PRs](https://github.com/mmoreram/translation-server/pulls)2MITPHPPHP &gt;=7.1

Since Nov 28Pushed 9y ago3 watchersCompare

[ Source](https://github.com/mmoreram/translation-server)[ Packagist](https://packagist.org/packages/mmoreram/translation-server)[ RSS](/packages/mmoreram-translation-server/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (12)Versions (6)Used By (2)

Translation Server
==================

[](#translation-server)

This Translation Server aims to provide a very easy, intuitive and fast way of adding new translations in your projects, following the Symfony Standards, and using the console as interface.

Tags
----

[](#tags)

- Use last unstable version ( alias of `dev-master` ) to stay in last commit
- Use last stable version tag to stay in a stable release.
- [![Latest Unstable Version](https://camo.githubusercontent.com/d58c7006b0eb6948552f98ed211730b9ca7b6ef6463583aaa2ef9bb1469340f6/68747470733a2f2f706f7365722e707567782e6f72672f6d6d6f726572616d2f7472616e736c6174696f6e2d7365727665722f762f756e737461626c652e706e67)](https://packagist.org/packages/mmoreram/translation-server)[![Latest Stable Version](https://camo.githubusercontent.com/3c1a7f5546ec137afaa9558d528e3d4ea4fdbbaf413a36cbf0ad201a51cfc97f/68747470733a2f2f706f7365722e707567782e6f72672f6d6d6f726572616d2f7472616e736c6174696f6e2d7365727665722f762f737461626c652e706e67)](https://packagist.org/packages/mmoreram/translation-server)

Install
-------

[](#install)

Install Translation Server in this way:

```
$ composer global require mmoreram/translation-server=dev-master
```

If it is the first time you globally install a dependency then make sure you include `~/.composer/vendor/bin` in $PATH as shown [here](http://getcomposer.org/doc/03-cli.md#global).

### Always keep your Translation Server installation up to date:

[](#always-keep-your-translation-server-installation-up-to-date)

```
$ composer global update mmoreram/translation-server
```

### .phar file

[](#phar-file)

You can also use already last built `.phar`.

```
$ git clone git@github.com:mmoreram/translation-server.git
$ cd translation-server
$ php build/translation-server.phar
```

You can copy the `.phar` file as a global script

```
$ cp build/translation-server.phar /usr/local/bin/translation-server
```

### Compile

[](#compile)

Finally you can also compile your own version of the package. ( You need set `phar.readonly = Off` in your php.ini ).

```
$ git clone git@github.com:mmoreram/translation-server.git
$ cd translation-server
$ composer update
$ php bin/compile
$ sudo chmod +x build/translation-server.phar
$ build/translation-server.phar
```

You can copy the `.phar` file as a global script

```
$ cp build/translation-server.phar /usr/local/bin/translation-server
```

Config
------

[](#config)

If your project wants to provide support for this project, make sure you place the definition about where are your translations, your master language and what languages do you support in a file called `.translation.yml`.

This file has this format (no needs to explain it, right? ^^)

```
master_language: en
languages:
    - en
    - es
    - ca
    - fr
    - de
    - it
    - fi
    - eu
    - gl
    - eo
    - nl
paths:
    - src/Folder/*/Resources/translations
```

you can also define where to search the `.translation.yml` file using the `--config|-c` option

```
$ translation-server translation:server:view --config="src/"
```

Commands
--------

[](#commands)

This server provides a set of commands useful for your project. Let's see all these commands one by one.

```
Console Tool

Usage:
  [options] command [arguments]

Options:
  --help           -h Display this help message.
  --quiet          -q Do not output any message.
  --verbose        -v|vv|vvv Increase the verbosity of messages
  --version        -V Display this application version.
  --ansi              Force ANSI output.
  --no-ansi           Disable ANSI output.
  --no-interaction -n Do not ask any interactive question.

Available commands:
  help                   Displays help for a command
  list                   Lists commands
translation
  translation:server:add   Add new translation
  translation:server:sort  Sort translations
  translation:server:view  View statics about the server
```

### Translations statics

[](#translations-statics)

You can see all your translation statics by using this command. Without any extra configuration, you will be able to see statics of all the project.

```
$ translation-server translation:server:view

[Trans Server] Command started at Thu, 08 Oct 2015 00:52:41 +0200
[Trans Server] Translations for [en] is 100% completed. 0 missing
[Trans Server] Translations for [ca] is 99.57% completed. 4 missing
[Trans Server] Translations for [es] is 99.57% completed. 4 missing
[Trans Server] Translations for [fr] is 78.34% completed. 203 missing
[Trans Server] Translations for [de] is 68.84% completed. 292 missing
[Trans Server] Translations for [it] is 0.11% completed. 936 missing
[Trans Server] Translations for [nl] is 0% completed. 937 missing
[Trans Server] Translations for [eo] is 0% completed. 937 missing
[Trans Server] Translations for [gl] is 0% completed. 937 missing
[Trans Server] Translations for [eu] is 0% completed. 937 missing
[Trans Server] Translations for [fi] is 0% completed. 937 missing
[Trans Server] Command finished in 932 milliseconds
[Trans Server] Max memory used: 13893632 bytes
```

#### Filtering by language

[](#filtering-by-language)

You can filter all results by language using the option \[--language|-l\] in all your commands. This is just a mask, so if you define one or more language, will simply mask all results provided to you.

```
$ translation-server translation:server:view --language es -l ca

[Trans Server] Command started at Thu, 08 Oct 2015 00:54:09 +0200
[Trans Server] Translations for [en] is 100% completed. 0 missing
[Trans Server] Translations for [ca] is 99.57% completed. 4 missing
[Trans Server] Translations for [es] is 99.57% completed. 4 missing
[Trans Server] Command finished in 917 milliseconds
[Trans Server] Max memory used: 13893632 bytes
```

As you can see, you can provide several languages

#### Filtering by domain

[](#filtering-by-domain)

You can filter all results by domain using the option \[--domain|-d\] in all your commands. This is just a mask, so if you define one or more domains, will simply mask all results provided to you.

```
$ translation-server translation:server:view --domain routes

[Trans Server] Command started at Thu, 08 Oct 2015 00:56:16 +0200
[Trans Server] Translations for [de] is 100% completed. 0 missing
[Trans Server] Translations for [en] is 100% completed. 0 missing
[Trans Server] Translations for [ca] is 100% completed. 0 missing
[Trans Server] Translations for [es] is 100% completed. 0 missing
[Trans Server] Translations for [eo] is 0% completed. 38 missing
[Trans Server] Translations for [nl] is 0% completed. 38 missing
[Trans Server] Translations for [gl] is 0% completed. 38 missing
[Trans Server] Translations for [it] is 0% completed. 38 missing
[Trans Server] Translations for [fr] is 0% completed. 38 missing
[Trans Server] Translations for [fi] is 0% completed. 38 missing
[Trans Server] Translations for [eu] is 0% completed. 38 missing
[Trans Server] Command finished in 842 milliseconds
[Trans Server] Max memory used: 13369344 bytes
```

You can provide as well several domains, even mix languages and domains.

### Asking for new translations

[](#asking-for-new-translations)

The power of this tool is that, just telling what language you'd like to work with, the tool will ask you interactively some translations.

Let's see an example. In that case we will ask some translations in Basque, but we only want to add routing translations, marked with the domain `routes`.

```
$ translation-server translation:server:add --language eu --domain routes

[Trans Server] Command started at Thu, 08 Oct 2015 00:59:43 +0200
[Trans Server] Language : eu
[Trans Server] Key : store_cart_nav
[Trans Server] Original : /cart/nav
[Trans Server] Translation : []
```

At this point, the prompt will wait for your response here. As soon as you have introduced your translation, just press *Enter* and your translation will be stored in it's place.

This means that if a new file must be created in order to store your translation, for example if you are creating a new language, the process will create it.

```
$ translation-server translation:server:add --language eu --domain routes

[Trans Server] Command started at Thu, 08 Oct 2015 00:59:43 +0200
[Trans Server] Language : eu
[Trans Server] Key : store_cart_nav
[Trans Server] Original : /cart/nav
[Trans Server] Translation : /saskia/nab

[Trans Server] Command started at Thu, 08 Oct 2015 01:00:25 +0200
[Trans Server] Language : eu
[Trans Server] Key : store_checkout_address
[Trans Server] Original : /cart/address
[Trans Server] Translation : []
```

As soon as the value is saved, the system will ask for another translation. As long as you don't press *Ctrl+C*, the system will do it once and again.

### Guessing missing translations

[](#guessing-missing-translations)

For lazy people, you can even translate your site using Google Translate. Of course we strongly recommend you to use this feature carefully, with a post checking of the results.

```
$ translation-server translation:server:guess --language eu

[Trans Server] Command started at Thu, 08 Oct 2015 00:59:43 +0200
[Trans Server] Language : eu
[Trans Server] Key : store_cart_nav
[Trans Server] Original : /cart/nav
[Trans Server] Translation : /saskia/nab
```

The command will start guessing your missing translations until you decide to stop with *Ctrl+C*.

This project uses the library [Stichoza/google-translate-php](https://github.com/Stichoza/google-translate-php). Easy and simple. Big kudos!

Of course, you can filter by language and domain.

### Sorting your translations

[](#sorting-your-translations)

You can sort all your translations as well, just using this great command.

```
$ translation-server translation:server:sort

[Trans Server] Command started at Thu, 08 Oct 2015 01:06:15 +0200
[Trans Server] Your translations have been sorted successfuly
[Trans Server] Command finished in 1288 milliseconds
[Trans Server] Max memory used: 13631488 bytes
```

Again, you can filter by language and domain.

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 64.7% of commits — single point of failure

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 ~197 days

Total

3

Last Release

3430d ago

PHP version history (2 changes)v1.0.0PHP ^5.4|^7.0

v1.2.0PHP &gt;=7.1

### Community

Maintainers

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

---

Top Contributors

[![mmoreram](https://avatars.githubusercontent.com/u/521409?v=4)](https://github.com/mmoreram "mmoreram (11 commits)")[![ScullWM](https://avatars.githubusercontent.com/u/1017746?v=4)](https://github.com/ScullWM "ScullWM (4 commits)")[![EmanueleMinotto](https://avatars.githubusercontent.com/u/417201?v=4)](https://github.com/EmanueleMinotto "EmanueleMinotto (2 commits)")

---

Tags

phptranslationserver

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/mmoreram-translation-server/health.svg)

```
[![Health](https://phpackages.com/badges/mmoreram-translation-server/health.svg)](https://phpackages.com/packages/mmoreram-translation-server)
```

###  Alternatives

[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.2M386](/packages/shopware-core)[ec-cube/ec-cube

EC-CUBE EC open platform.

78527.0k1](/packages/ec-cube-ec-cube)

PHPackages © 2026

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