Translation functions
Developers can use functions to call translations in process flows. These are the available functions you can use for translation:
translation.translateForLocale(<translation-key>, <iso-locale>)
Use this function to translate phrases based on a specified locale.
For example, when applied to an Assign node, this function fetches the translated value and assigns it to the variable:
translation.translateForLocale("EmailContent", "hi_IN")
The "EmailContent" parameter is the key field from the translation table. This is the data from the Translation field in the Translation form. The "hi_IN" parameter is the Iso Locale.
The same code can be used in an the Email node content field by using the variable format:
<
!translation.translateForLocale("EmailContent", "hi_IN")>
translation.translateForUser(<translation-key>, <actorID>)
Use this function to translate phrases based on the locale of a specified user. For example:
translation.translateForUser("EmailContent", "jDoe")
, where the actor ID is "jDoe".translation.translateForRecipient(<translation-key>)
Use this function to translate phrases based on the locale of the users specified in the To field in the Email node and the notification feature of the User Action node. For example:
translation.translateForRecipient("EmailContent")
translation.translateForEmail(<translation-key>, <email-address>)
Use this function to translate phrases based on the locale of the specified email address. IPA uses the email address to find the actor record and its locale information. For example:
translation.translateForEmail("EmailContent", jDoe@infor.com)