Manage Symfony App translations with Translala

Symfony translation component is an essential part of the Symfony ecosystem. It provides tools to internationalize your application, using messages catalogs and different domain translator.

There are more and more tools to translate catalog messages with some translation API like Google Translate. But if you wan’t to have a global view on a project with differents locale and with differents transalation delay, you have to use Translala.

What is Translala ?

Translala is your new toolbox to manage your projects translations. It provide commands to translate your missing translations, detect commons translations, report translations stats and detect dead translations. (First version work with yml file only)

Install

Grab the translala.phar and move it to your bin.

$ git clone git@github.com:Translala/translala.git && cp translala/build/translala.phar /usr/local/bin/translala

Configure your project

Here is what a complete .translation.yml file look like. You can add many path for each of your translation path. The translala report are dumped in your export path.

master_language: fr
languages:
- en
- fr
- da
paths:
- ./app/Resources/translations/
export_path: /tmp
api:
google: my_very_secret_api_key
project_path: ./

Stats command

translala translala:project:stats --config ./app/Resources/translations/.translation.yml

The stats command report project stats about translations achievements.

Common command

translala translala:project:common --config ./app/Resources/translations/.translation.yml

Do you have a different translation key for each “save” buttons of your form? With many locales, it can have a significant cost.

Dead command

translala translala:project:dead --config ./app/Resources/translations/.translation.yml

This search each translations keys in your project to help you find dead key.

Translation command

translala translala:project:translate --config ./app/Resources/translations/.translation.yml

Using php-translation it translate missing or empty keys for each locale in each file.

Feel Free to contribute to this project or give feedback.