CurrentLanguage

circle-info

The current language active in the Runtime, as configured in the project settings and optionally changed/selected by the user, or the "Change language" process node, in the active session.

This function is SQL compatible. For more information about SQL compatibility, see our documentation.

circle-check
circle-info

Underscore or Hyphen

The Language Code or Keyword is used with underscore and no doublequotes: nl_NL or en_US

The Language as a value, as displayed on a page or used as a text-parameter, uses a hyphen: "nl-NL" or "en-US" (doublequotes in expression as text) or nl-NL / en-US as plain values on page.

When a function or a process node expects a language value as input, it may in some cases accept the keyword (nl_NL) and in other cases the ToString value ("nl-NL"). You can then choose to use the text literal (like "nl-NL") or use the ToString(language) function, like ToString(CurrentLanguage) or ToString(nl_NL).

chevron-rightCurrentLanguagehashtag

CurrentLanguage πŸ‘Result: en_US (underscored keyword) OR en-US (hyphened when directly displayed on a page as a label)

ToString(CurrentLanguage) πŸ‘Result: en-US (hyphened text value)

Comparisons, assuming the actual current language is en_US

CurrentLanguage = en_US πŸ‘Result: yes

CurrentLanguage = nl_NL πŸ‘Result: no (because it is en_US)

CurrentLanguage = "en-US" πŸ‘Žwarning: expression contains a type mismatch (keyword expected, string used)

CurrentLanguage = nl_NL πŸ‘Result: no (because it is en_US)

ToString(CurrentLanguage) = "en-US" πŸ‘Result: yes

ToString(CurrentLanguage) = "not a language" πŸ‘Result: no

ToString(CurrentLanguage) = ToString(en_US) πŸ‘Result: yes

ToString(en_US) = "en-US" πŸ‘Result: yes

Last updated

Was this helpful?