The SetCurrentLocale action is a System Action that sets the language locale of the user session. The language locale is used for presentation purposes and follows the RFC 1766 standard format.

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

Once the current language locale is set, your application will be presented to the end-user in the corresponding language, according to the translations. If no set is explicitly made, the language used is the one specified in the .NET framework. When this is also missing, the Windows operating system installation language of the Platform Server is used.

If the language locale name you specified does not have translations or if there are some elements that are not translated to the language, the application will be displayed, to the end-user, in the language used in the development of the eSpace.

The SetCurrentLocale function can be used, for example, in a Link widget associated with a Flag image, or in the OnSessionStart action.

Input parameters

Text Type. Mandatory

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.

You should use the <country/region_code2> if you want to consider, in the application, the differences between several countries or regions, for example English in the United States and United Kingdom.

Output parameters


Possible exceptions

A general exception might be raised when the language you specified does not respect the RFC 1766 standard format. For example:

SetCurrentLocale ("es-SP") will raise an exception.

See Also

About Multilingual eSpaces | GetCurrentLocale Function | Overview of System Actions and Functions