Translation API 2.0.0

Translation API

This extension lets you fetch localized labels from TYPO3. It will automatically export labels as JSON from any locallang.xlf file, given its extension key.


Please add following rewrite rules to your .htaccess:

RewriteRule ^t3api/translation/(.*)$ /index.php?eID=routing&route=translationapi/$1 [QSA,L]

or nginx configuration

rewrite ^/t3api/translation/(.*)$ /index.php?eID=routing&route=translationapi/$1 last;

How-To Use as Web Service

In order to fetch labels from extension xyz, call:


If you want to only return labels whose key is prefixed by, say, "module", then call:


This will effectively filter XLIFF keys and keep those starting with "module." (mind the period). You may of course use a longer prefix, such as "", which would filter keys starting with "".

How-To Use within Fluid

This extension is able to export the labels as JSON to be embedded into a HTML snippet:

``` <div xmlns="" lang="en" xmlns:f="" xmlns:l10n="" >

<!-- standard notation -->
<l10n:exportXliff extensionKey="some-extension" prefix="some-prefix" />

<!-- inline notation -->
<section data-localized-days='{l10n:exportXliff(extensionKey:"some-extension", prefix:"some-prefix")}'>



  • ?omitPrefix=yes (default "no") will strip the prefix from the key. E.g. with "module" as prefix,

key "" will be returned as ""

  • ?expand=yes (default "no") will "expand" the keys as subarrays:

{       "": "value1",       "": "value2",   }


{       "module": {           "foo": {               "bar": {                   "key1": "value1",                   "key2": "value2"               }           }       }   }