API Playground - set_translation

set_translation


Use this function to add text translations for your site or metasite. This is equivant to going to Settings / Customized translations. There you'll also find the existing text identifiers you can set with this function (S_xxx). Please note that you should always set the target language for the translation using the language parameter.

Note: if you want to translate custom resource properties (such as resource description) or the resource name, use the function set_custom_property in order to set given custom resource property value for given language. (click for full documentation)

text_id

Text identifier to be translated. This always starts with the S_ prefix. If you want to add your custom text (by default not used elsewhere by the system), use the S_CUS_ prefix, e.g. S_CUS_ABC.

value

Translation value.

site_id

If using a metasite API key and if the translation should be applied to a single site only, you can specify the site ID here

resource_id

If the translation should be applied to a single resource only, you can specify the resource ID here

language

by specifying a 2-letter (ISO 639-1) language code (all capital letters e.g. EN, DE, FR, ES, IT) you can change the language of the text values returned

api_key

* - Pflichtfeld