translate
Methods
text
text(
pText,pLocale?):string
Translates the text you passed into the language required on the client. Make sure to enter the text without leading or trailing spaces!
Parameters
string | number | booleanThe text to be translated.
string | number | booleanThe language into which the text is to be translated, e.g. "de_DE".
Returns
stringThe translation.
Throws
May throw an exception.
Example
question.showMessage(translate.text("Kontaktperson", "en_GB"));
withArguments
withArguments(
pText,pArguments,pLocale?):string
Translates a text, using the resources from the application pool.
The text itself can contain placeholders (% 0,% 1,% 2, and so on) that are then replaced by the corresponding arguments.
"%" can be escaped by the backslash.
Parameters
string | number | booleanThe text to be translated.
string[]An array with arguments that were specified in the text to be translated with %0 to %n.
string | number | booleanThe language into which the text is to be translated, e.g. "de" or "de_AT".
Returns
stringThe translation.
Throws
May throw an exception.
Example
var ext = fileIO.getName(data).split(".");
ext = ext[ext.length-1].toLowerCase();
question.showMessage(translate.withArguments("Dateiformat %0 nicht unterstützt.", [ext], "en_GB"));