Tomahawk uses Symfony's Translator Component to provide translations.

The easiest way to use the Translator component is to access to it through the container $container->get('translator').

If your using it in a template you can use Php Helpers or Twig Extensions.


You can configure the locale, translation and cache directories in app/config/translation.php

Basic Translation

You can use the trans() method to translate a simple message:


You can use the transChoice() method to translate a string that might be plural: