Platform SDK: International Features

ConvertDefaultLocale

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

LCID ConvertDefaultLocale(
  LCID Locale   // default locale
);

Parameters

Locale
[in/out] Default locale value that the function converts to a locale identifier (LCID). The following are the default locale values.
Value Description
LOCALE_SYSTEM_DEFAULT The system's default locale.
LOCALE_USER_DEFAULT The current user's default locale.
A sublanguage-neutral locale A locale identifier constructed by calling MAKELCID with a primary language identifier, such as LANG_ENGLISH, and the SUBLANG_NEUTRAL sublanguage 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.

Requirements

  Windows NT/2000: Requires Windows NT 3.5 or later.
  Windows 95/98: Requires Windows 95 or later.
  Header: Declared in Winnls.h; include Windows.h.
  Library: Use Kernel32.lib.

See Also

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