VerLanguageNameA function

Retrieves a description string for the language associated with a specified binary Microsoft language identifier.

Syntax

DWORD VerLanguageNameA(
  DWORD wLang,
  LPSTR szLang,
  DWORD cchLang
);

Parameters

wLang

Type: DWORD

The binary language identifier. For a complete list of the language identifiers, see Language Identifiers.

For example, the description string associated with the language identifier 0x040A is "Spanish (Traditional Sort)". If the identifier is unknown, the szLang parameter points to a default string ("Language Neutral").

szLang

Type: LPTSTR

The language specified by the wLang parameter.

cchLang

Type: DWORD

The size, in characters, of the buffer pointed to by szLang.

Return Value

Type: DWORD

The return value is the size, in characters, of the string returned in the buffer. This value does not include the terminating null character. If the description string is smaller than or equal to the buffer, the entire description string is in the buffer. If the description string is larger than the buffer, the description string is truncated to the length of the buffer.

If an error occurs, the return value is zero. Unknown language identifiers do not produce errors.

Remarks

This function works on 16-, 32-, and 64-bit file images.

Typically, an installation program uses this function to translate a language identifier returned by the VerQueryValue function. The text string may be used in a dialog box that asks the user how to proceed in the event of a language conflict.

Requirements

   
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header winver.h (include Windows.h)
Library Version.lib
DLL Api-ms-win-core-localization-l1-2-1.dll

See Also

Version Information Overview