A Long indicating the current locale ID.
Gets the current locale ID.
A locale ID represents a language as well as regional conventions. It determines such things as keyboard layout, alphabetic sort order, and date, time, number, and currency formats.
Appendix D lists valid locale IDs.
If you want to temporarily change the locale, there is no need to call GetLocale and store its returned value before calling SetLocale, since SetLocale returns the value of the previous locale ID.
GetLocale returns the locale ID currently in use by the script engine.
Although you can set the locale using either a decimal, hexadecimal, or string locale ID, the GetLocale function returns only a decimal locale ID value.
The default value of the script engine’s locale ID is determined as follows: When the script engine starts up, the host passes it a locale ID. If the host does not do so, the script engine uses the user’s default locale ID. If there is no user, then the script engine uses the system’s default locale ID.
Note that the script engine’s locale ID is different from the system locale ID, the user locale ID, and the host application’s locale ID. The GetLocale function reports the locale ID in use by the script engine only.
The GetLocale function is not supported by VBA.