The GetCurrentLocale function is a built-in function that returns the current language locale of the user session. The language locale name is used for presentation purposes and follows the RFC 1766 standard format.

The GetCurrentLocale function only works for Web Flows, Web Services and Timers.


The current locale name retrieved is one of those presented below, in this order: if the first is not available, the second one will be used instead, and so on:

  1. The locale explicitly set using the SetCurrentLocale action in the current user session.

  2. The default globalization setting specified in the .NET framework.
    Talk to the administrator of the Platform Server machine and check the globalization settings specified for the .NET framework (the uiCulture attribute under the globalization section, in the machine.config file). Note, however, that any changes in these settings will affect all the applications running on that server.

  3. The Windows operating system installation language of the Platform Server where the application is running.

Input parameters


Output parameters

Text Type

This string has the following format:


where language_code2 is a lowercase two-letter code derived from ISO 639-1 and country/region_code2 is an uppercase two-letter code derived from ISO 3166.



Some Possible Results


"en" - "English" language-country region.

"en-US" - "English - United States" language-country region.

"en-GB" - "English - United Kingdom" language-country region.

"pt" - "Portuguese" language-country region.

"pt-PT" - "Portuguese - Portugal" language-country region.

"pt-BR" - "Portuguese - Brazil" language-country region.

"es-ES" - "Spanish - Spain" language-country region.

"nl-NL" - "Dutch - The Netherlands" language-country region.


See Also

Available Environment Functions | Available Built-in Functions