Read-UserDefaultLanguage

Reads the ID of the current user's Windows language and stores the result in a variable. The format in which the ID is read can be specified.


Settings:

  • Variable name
    Name of the variable where the read ID should be stored. Specify only the name of the variable, not the $ sign and the curly braces.
  • Format
    The format for the ID of the user language read. The following options are available:
    • DSM language code (one letter)
      German (D), English (E), French (F), Spanish (S) and Portuguese (P) are output as system languages. Language variants are not taken into account. All other languages are output as (E).
    • IETF language tag (RFC 4646)
      For example, for "German (Germany)" the value "de-DE" or for "English (United States)" the value "en-US" is returned.
    • Windows locale identifier (LCID)
      The Locale ID as returned by Windows, e.g. "1031" for "German (Germany)" or "1033" for "English (United States)".
    • ISO 639-1 three-letter-code
      Three-letter code according to ISO 639-1, for example "deu" for "German" or "eng" for "English".
    • Windows API three-letter-code
      Returns the language code as defined in the Windows API, for example "DEU" for "German" or "ENU" for "English".
    • ISO 639-1 two-letter-code
      Two-letter code according to ISO 639-1, for example "de" for "German" or "en" for "English".
    • English name
      The official English language name of the user language, for example, "German (Germany)" or "English (United States)".
    • Display name
      The localized display name of the user language, for example, "German (Germany)" or "English (USA)".
    • Native name
      The native name corresponds to the display name in the respective language.


Example:

The following example stores the two-letter ISO 639-1 language code of the current user language in the _UserLang variable.


Corresponds to DSM eScript command:

  • GetUserDefaultLangID


See also: