SetUserLanguage

(VTScada-Layer function. Must be called with a leading backslash.)

Description:

Changes the user's current session language to any of the languages currently enabled in the application. Useful for dynamic language switching.

Returns: Boolean
Usage: Script Only.
Function Groups: String and Buffer
Related to:  
Format: SetUserLanguage(LanguageCode)
Parameters:  
LanguageCode

Required text. The code for the language you want to start using ("EN", "FR", etc.)

The language must be enabled for the application.

Comments:

Language codes in use within an application can be seen in the Application Configuration dialog, Languages page.

This function cannot be used in tags because they will not have access to the user's current session.

Example:

  If WinButton(232, 148, 412, 100,
               0          { normal appearance },
               "English " { label },
               1          { focus id enables button },
               0          { default system font },
               ToggleVal  { monitor state});
  [
    \SetUserLanguage("EN");
  ]

  If WinButton(232, 198, 412, 150,
               0          { normal appearance },
               "French "  { label },
               1          { focus id enables button },
               0          { default system font },
               ToggleVal  { monitor state});
  [
    \SetUserLanguage("FR");
  ]