Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Excerpt
hiddentrue

translate(value) Will translate the value according to the application running and the current user's locale

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.

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 "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