Internationalization and localization

Except for some lowlevel functions, TYPO3 CMS exclusively uses localizable strings for all labels displayed in the backend. This means that the whole user interface may be translated. The encoding is strictly UTF-8.

The default language is English, and the Core ships only with such labels (and so should extensions).

All labels are stored in XLIFF format, generally located in the Resources/Private/Language folder of an extension (old locations may still be found in some places). Working with XLIFF files is described in more detail in Core API.

Adding a language to TYPO3 CMS

The list of supported languages is defined in \TYPO3\CMS\Core\Localization\Locales::$languages. Adding support for a new language thus starts by adding the language there and waiting for the next release.

Translating TYPO3 CMS

Translations happen on the community translation server ( both for the Core and for extensions. More information can be found in the TYPO3 wiki.

Fetching translations

The ADMIN TOOL > Languages module shows a list of available languages. In the "Installed Languages" view, you can choose which languages you would like to make available to your users.

The Languages module

The Languages module, with an active search and showing status of languages

By using the "Download all" icon in the docheader the update of translations for all extensions in all selected languages is triggered. The downloaded language packs are stored in typo3conf/l10n/[language code].

The "Translation Overview" view of the Languages module offers a fine-grained interface, where a single language pack can be downloaded.

All languages packs can also be fetched using the command line:

/path/to/typo3/bin/typo3 extbase language:update

The language classes

Various classes are involved in the localization process.

The \TYPO3\CMS\Core\Localization\LocalizationFactory class is dedicated to loading the language files. It also manages localization overrides.

The \TYPO3\CMS\Core\Localization\LanguageService provides the actual methods to retrieve a localized label. getLL() gets a label from an already loaded language file. sL() loads a language file first and then returns a label from it (using a string with the LLL:EXT:... syntax as argument).

The \TYPO3\CMS\Extbase\Utility\LocalizationUtility is essentially a convenience wrapper around the \TYPO3\CMS\Core\Localization\LanguageService class, whose translate() method also takes an array as argument and runs PHP's vsprintf() on the localized string.