Share via


VBScript's SetLocale doesn't know about new Vista locales.

I just discovered that VBScript has a SetLocale() function that apparently is backed by a static list of locale names, which means that its locale names aren't consistent with the list supported in Vista.

Fortunatly SetLocale(0) gets you the current user locale, so many VBScript users should be happy with that, but if you need a locale other than the current locale, particularly if you need a custom locale, you're pretty much out of luck.

Comments

  • Anonymous
    May 12, 2007
    It's not just Vista - there are locales added in XP SP2 that are not included. SetLocale DOES support passing an LCID number. If a newer locale has an LCID defined for it, it can be used in VBScript. Of course, custom locales that are referenced only by name are still out of luck.