system.util.modifyTranslation
This function is used in Python Scripting.
Descriptionβ
This function allows you to add or modify a global translation.
Client Permission Restrictionsβ
Permission Type: Translation Management
Client access to this scripting function is blocked to users that do not meet the role/zone requirements for the above permission type. This function is unaffected when run in the Gateway scope.
Syntaxβ
system.util.modifyTranslation(term, translation, [locale])
Parametersβ
| Type | Parameter | Description |
|---|---|---|
| String | term | The key term to translate. |
| String | translation | The translated value to store. |
| String | locale | If specified, the locale identifying the language of the translation, such as "es" or "es-ES". Accepts both the BCP-47 language tag (recommended) and the legacy underscore formats. Make sure to use locale codes for either format, and not language names, such as "Spanish". Otherwise, the currently set language is used. [optional] |
Returnsβ
Nothing
Scopeβ
Gateway, Vision Client, Perspective Session
Code Examplesβ
Example #1
# This code adds or updates a translation into French
# for the world Hello. Note the u in front "AllΓ΄!", which
# is needed for Python strings outside of the 7-bit ASCII
# range.
system.util.modifyTranslation("Hello", u"AllΓ΄!", "fr")