Previous Topic

Book Contents

Book Index

Next Topic

translate
  • Functionality

    This function will return a translation according to selected language.

  • Arguments

    The key of a translation from the 'Translations of Application Text' catalog. The translation must be of the 'messages/Messages' base name.

  • Parameters

    The 'translate' function accepts message parameters. See 'example 2' below. Correct use of braces for parameters specification is checked by metamodel check option 'Translations of Application Text'.

  • Return

    A String.

  • Example 1

    Adding the function e.g. to a treeview...:

    valueset(systype) + ': ' + systemname + if(isNull(name),' ', (' [' + name + '] ')) + valueset(status) + translate('deleteFailed')

    ...will add a translation of the key 'deleteFailed' to the treeview.

    Example 2

    In calculation: translate('key', desk, 'text', typeLocation) 'key' is the translation key and desk, 'text' and typeLocation are translation parameters.

    Help Image

    When 'Translations of Application Text' are used to specify translation for the 'key', the 'Standard Translation' (in the corresponding field of the 'Translation of Application Text' object) can be created e.g. as follows:

    param 1: {0} param 2: {1} param 3: {2}

    where {0} represents the first position in the calculation, {1} represents the second position and {2} the third position.

    Help Image

    The field assigned as 'Attribute For Results' then will display the translation together with corresponding parameter values.

    Help Image

See Also

Available Functions

cast

countService

countService2

currencyConversion

cmp

dayOfMonth

ge (greater or equals than), ge_

gt (greater than), gt_

le (less or equals than), le_

lt (less than), lt_

eq (equals), eq_ and cmp

ne_

evalCondition

evalExpression

pyeval

not

isNull

Null

getAttributeTranslation

getAuditedBOTranslation

getAuditedValueRelation

getBOTypeTranslation

getCurrentDate

getCurrentTime

getCurrentTimeStamp

getCurrentUserld

getMaximalTimeStamp

getMaximalDate

getParameter

getPicture()

getValuesetTranslation

if, case and coalesce

trimLeft

isValid

max

min

month

round

size

substring

sum

trim

trimRight

replaceFromEnd

unit conversion

valueset

year