API - Planyo Web Services - set_translation

You are here: Planyo » Help » API » 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.


text_id string required
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 string required
Translation value.
site_id int optional
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 int optional
If the translation should be applied to a single resource only, you can specify the resource ID here
method string required
must be set to set_translation
language string optional
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 string required
your API key - Click here to get your key. If your API key uses a hash key, you must also include the parameters hash_key and hash_timestamp.



API playground:

Click here to test this function in the API playground.