#include <ver.h> |
UINT VerLanguageName(uLang, lpszLang, cbLang) | |||||
UINT uLang; | /* Microsoft language identifier | */ | |||
LPSTR lpszLang; | /* address of buffer for language string | */ | |||
UINT cbLang; | /* size of buffer, */ |
The VerLanguageName function converts the specified binary Microsoft language identifier into a text representation of the language.
uLang
Specifies the binary Microsoft language identifier. For example, VerLanguageName translates 0x040A into Castilian Spanish. If VerLanguageName does not recognize the identifier, the lpszLang parameter will point to a default string, such as “Unknown language”. For a complete list of the language identifiers supported by Windows, see the following Comments section.
lpszLang
Points to the buffer to receive the null-terminated string representing the language specified by the uLang parameter.
cbLang
Indicates the size of the buffer, in bytes, pointed to by lpszLang.
The return value is the length of the string that represents the language identifier, if the function is successful. This value does not include the null character at the end of the string. If this value is greater than cbLang, the string was truncated to cbLang. The return value is zero if an error occurs. Unknown uLang values do not produce errors.
Typically, an installation application 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.
Windows supports the following language identifiers:
Value | Language |
0x0401 | Arabic |
0x0402 | Bulgarian |
0x0403 | Catalan |
0x0404 | Traditional Chinese |
0x0405 | Czech |
0x0406 | Danish |
0x0407 | German |
0x0408 | Greek |
0x0409 | U.S. English |
0x040A | Castilian Spanish |
0x040B | Finnish |
0x040C | French |
0x040D | Hebrew |
0x040E | Hungarian |
0x040F | Icelandic |
0x0410 | Italian |
0x0411 | Japanese |
0x0412 | Korean |
0x0413 | Dutch |
0x0414 | Norwegian – Bokml |
0x0415 | Polish |
0x0416 | Brazilian Portuguese |
0x0417 | Rhaeto-Romanic |
0x0418 | Romanian |
0x0419 | Russian |
0x041A | Croato-Serbian (Latin) |
0x041B | Slovak |
0x041C | Albanian |
0x041D | Swedish |
0x041E | Thai |
0x041F | Turkish |
0x0420 | Urdu |
0x0421 | Bahasa |
0x0804 | Simplified Chinese |
0x0807 | Swiss German |
0x0809 | U.K. English |
0x080A | Mexican Spanish |
0x080C | Belgian French |
0x0810 | Swiss Italian |
0x0813 | Belgian Dutch |
0x0814 | Norwegian – Nynorsk |
0x0816 | Portuguese |
0x081A | Serbo-Croatian (Cyrillic) |
0x0C0C | Canadian French |
0x100C | Swiss French |