PhixFlow Help

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Current »

Function: translate()

Use this function to translate a value according to the application running and the current user's locale. It can additionally have extra parameters that will not be translated.

When the string is translated, any %s in the translated string will be replaced with each of the extra parameters in order. The function translates to the language specified in the current user's locale.

Syntax

translate(value, arg0,.....argN)

ArgumentTypeDescription
valueStringA string of characters to be translated
arg0...NStringA collection of strings which will replace the characters "{n}" in the final translations

Examples

translate("Monday")

Returns the string "Lundi" where the current user has the locale France, with the language "French (FR_fr)", and the application has a translation table which translates "Monday" to "Lundi" for the language "French (Fr_fr)" .

Returns the string "Montag" where the current user has the locale Germany, with the language "German(DE_de)" and the application has a translation table which translates "Monday" to "Montag" for the language "German(DE_de)".


translate("Doctors","Fred", "Sally")


Returns the string "Docteurs Fred et Sally" where the current user has the locale France, with the language "French (FR_fr)", and the application has a translation table which translates "Doctors" to "Docteurs {0}s et {1}" for the language "French(FR_fr)".

Returns the string "Docteurs Sally et Fred" where the current user has the locale France, with the language "French (FR_fr)", and the application has a translation table which translates "Doctors" to "Docteurs {1}s et {0}" for the language "French(FR_fr)".

See Also


  • No labels