ConvertDefaultLocale

The ConvertDefaultLocale function converts a default locale value to an actual locale identifier.

LCID ConvertDefaultLocale(
  LCID Locale   // default locale value to be converted
);
 

Parameters

Locale
A default locale value that the function converts to a locale identifier (LCID). The following list shows the default locale values:
Value Description
LOCALE_SYSTEM_DEFAULT The system's default locale.
LOCALE_USER_DEFAULT The current user's default locale.
LOCALE_NEUTRAL The language-neutral default locale.
Any sublanguage-neutral locale A locale identifier constructed by calling MAKELCID with a primary language identifier, such as LANG_ENGLISH, and the SUBLANG_NEUTRAL secondary language identifier.

Return Values

If the function succeeds, the return value is the appropriate LCID.

If the function fails, the return value is the Locale parameter. The function fails when Locale is not one of the default locale values listed above.

Remarks

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

For more information, see Locales and Language Identifiers.

QuickInfo

  Windows NT: Requires version 3.5 or later.
  Windows: Requires Windows 95 or later.
  Windows CE: Requires version 1.0 or later.
  Header: Declared in winnls.h.
  Import Library: Use kernel32.lib.

See Also

National Language Support Overview, National Language Support Functions, GetSystemDefaultLCID, GetUserDefaultLCID