Export (0) Print
Expand All
Expand Minimize

ConvertDefaultLocale function

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.

Syntax


LCID ConvertDefaultLocale(
  _In_  LCID Locale
);

Parameters

Locale [in]

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.

Remarks

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.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Winnls.h (include Windows.h)

Library

Kernel32.lib

DLL

Kernel32.dll

See also

National Language Support
National Language Support Functions
GetLocaleInfoEx
GetSystemDefaultLCID
GetSystemDefaultLocaleName
GetUserDefaultLCID
GetUserDefaultLocaleName
LCIDToLocaleName

 

 

Community Additions

ADD
Show:
© 2014 Microsoft