Changing Translations

Another common task is to change existing translations and labels for the front or back end. Any translation changes or additional translations are done in the contao/languages/<language>/ folder. Within each language’s folder a file needs to be created according to the translation’s domain.

Assume you want to change the translation of “Read more …" for the English language (used for the detail link of a news or calendar entry for example) to just “more”. The translation key for this particular label is MSC.more in the default translation domain. Thus you need to create a file with the following content:

// contao/languages/en/default.php
$GLOBALS['TL_LANG']['MSC']['more'] = 'more';

Alternatively you can also create an XLIFF file (.xlf) instead of using the PHP array notation. Finding the right translation key and domain can only be done by searching through the source of the translations. Read more about translations in the framework documentation.

Next: implementing your first Hook.