ConvertDefaultLocale function (winnls.h)

Converts a default locale value to an actual locale identifier.

Note  This function is only provided for converting partial locale identifiers. Your applications should use locale names instead of identifiers. The LCIDToLocaleName function can be used to convert a locale identifier to a valid locale name. Your application can also use GetUserDefaultLocaleName to retrieve the current user locale name; GetSystemDefaultLocaleName to retrieve the current system locale name; and GetLocaleInfoEx with LOCALE_SNAME to retrieve the locale name for any input locale, including the default constants.


LCID ConvertDefaultLocale(
  [in] LCID Locale


[in] Locale

Default locale identifier value to convert. You can use the MAKELCID macro to create a locale identifier or use one of the following predefined values.

Windows Vista and later: The following custom locale identifiers are also supported.

Return value

Returns the appropriate locale identifier if successful.

This function returns the value of the Locale parameter if it does not succeed. The function fails when the Locale value is not one of the default values listed above.


A call to ConvertDefaultLocale specifying LOCALE_SYSTEM_DEFAULT is equivalent to a call to GetSystemDefaultLCID. A call to ConvertDefaultLocale specifying LOCALE_USER_DEFAULT is equivalent to a call to GetUserDefaultLCID.


Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header winnls.h (include Windows.h)
Library Kernel32.lib
DLL Kernel32.dll

See also







National Language Support

National Language Support Functions