Skip to content

Latest commit

 

History

History
142 lines (112 loc) · 4.91 KB

nf-winnls-lcidtolocalename.md

File metadata and controls

142 lines (112 loc) · 4.91 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:winnls.LCIDToLocaleName
LCIDToLocaleName function (winnls.h)
Converts a locale identifier to a locale name.
LCIDToLocaleName
LCIDToLocaleName function [Internationalization for Windows Applications]
_win32_LCIDToLocaleName
intl.lcidtolocalename
winnls/LCIDToLocaleName
intl\lcidtolocalename.htm
Intl
63233e3e-5b7c-43cb-9c62-88b0791c2647
12/05/2018
LCIDToLocaleName, LCIDToLocaleName function [Internationalization for Windows Applications], _win32_LCIDToLocaleName, intl.lcidtolocalename, winnls/LCIDToLocaleName
winnls.h
Windows.h
Windows
Windows Vista [desktop apps \| UWP apps]
Windows Server 2008 [desktop apps \| UWP apps]
Kernel32.lib
Kernel32.dll
Windows
19H1
LCIDToLocaleName
winnls/LCIDToLocaleName
c++
APIRef
kbSyntax
DllExport
Kernel32.dll
API-MS-Win-Core-Localization-Obsolete-l1-1-0.dll
KernelBase.dll
API-MS-Win-Core-Localization-Obsolete-l1-2-0.dll
API-MS-Win-DownLevel-Kernel32-l1-1-0.dll
MinKernelBase.dll
API-MS-Win-Core-Localization-L1-2-2.dll
LCIDToLocaleName

LCIDToLocaleName function

-description

Converts a locale identifier to a locale name.

Note  For custom locales, including those created by Microsoft, your applications should prefer locale names over locale identifiers.

 

-parameters

-param Locale [in]

Locale identifier to translate. You can use the MAKELCID macro to create a locale identifier or use one of the following predefined values.

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

-param lpName [out, optional]

Pointer to a buffer in which this function retrieves the locale name, or one of the following predefined values.

-param cchName [in]

Size, in characters, of the locale name buffer. The maximum possible length of a locale name, including a terminating null character, is LOCALE_NAME_MAX_LENGTH. This is the recommended size to supply for this parameter.

Alternatively, the application can set this parameter to 0. In this case, the function returns the required size for the locale name buffer.

-param dwFlags [in]

Before Windows 7: Reserved; should always be 0.

Starting with Windows 7: Can be set to LOCALE_ALLOW_NEUTRAL_NAMES to allow the return of a neutral name.

-returns

Returns the count of characters, including the terminating null character, in the locale name if successful. If the function succeeds and the value of cchName is 0, the return value is the required size, in characters (including nulls), for the locale name buffer.

The function returns 0 if it does not succeed. To get extended error information, the application can call GetLastError, which can return one of the following error codes:

  • ERROR_INSUFFICIENT_BUFFER. A supplied buffer size was not large enough, or it was incorrectly set to NULL.
  • ERROR_INVALID_PARAMETER. Any of the parameter values was invalid.

-see-also

LocaleNameToLCID

National Language Support

National Language Support Functions