A locale is the RFC-1766/3066 compliant specification for language and country.
The scope of execution of an ASL script is within the context of a Domain Manager. Once connected, the locale can be changed by using the setLocale()function. The syntax is:
<var> = setLocale(<locale>)
The return value is a string representation of the previous setting of the locale, or a default value if setLocale() has not yet been called.
The following example sets the locale to French as spoken in France.
old_locale = setLocale(”fr_FR”); print(“The old locale was “.old_locale);
When setLocale() is called in ASL, the value of the locale is saved in thread-local storage. When an ASL script connects to a Domain Manager, the same thread is used for the lifetime of the connection session. Therefore, if you call setLocale(“fr_FR”) from an ASL script, then the locale is fr_FR for the duration of the ASL script. When the script ends, the Domain Manager thread goes away. Other ASL scripts, and other clients each have their own connection/session in their own thread, so each thread is independent of the others.