Translations

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.

Configuration

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:

Pluralization

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