Calling the "Locale Name" Functions

Windows Vista introduces a large number of functions that use locale names instead of locale identifiers. These new functions provide good support for supplemental locales, and several of them provide additional functionality not available in the older NLS functions. Some of them, such as the new enumeration functions, also represent design improvements.

Note

Applications that are intended to run only on Windows Vista and later should use the "locale name" functions in preference to the NLS functions that use locale identifiers.

 

The following table lists the locale name functions along with the older functions that they can replace.

Functions using locale names Functions using locale identifiers
CompareStringEx CompareString
EnumCalendarInfoExEx EnumCalendarInfo, EnumCalendarInfoEx
EnumDateFormatsExEx EnumDateFormats, EnumDateFormatsEx
EnumSystemLocalesEx EnumSystemLocales
EnumTimeFormatsEx EnumTimeFormats
FindNLSStringEx FindNLSString
GetCalendarInfoEx GetCalendarInfo
GetCurrencyFormatEx GetCurrencyFormat
GetDateFormatEx GetDateFormat
GetDurationFormatEx GetDurationFormat
GetLocaleInfoEx GetLocaleInfo
GetNLSVersionEx GetNLSVersion
GetNumberFormatEx GetNumberFormat
GetSystemDefaultLocaleName GetSystemDefaultLCID
GetTimeFormatEx GetTimeFormat
GetUserDefaultLocaleName GetUserDefaultLCID
IsValidLocaleName IsValidLocale
LCMapStringEx LCMapString

 

Example

An example showing the use of several functions based on locale names can be found in NLS: Name-based APIs Sample.

Using National Language Support