The VerLanguageName function retrieves a description string for the language associated with a specified binary Microsoft language identifier.
DWORD VerLanguageName(
DWORD wLang, |
// Microsoft language identifier |
LPTSTR szLang, |
// pointer to buffer for language description string |
DWORD nSize |
// size of buffer |
); |
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”).
If the return value is less than or equal to the buffer size, 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 return value is greater than the buffer size, the return value is the size of the buffer required to hold the entire string. The string is truncated to the length of the existing buffer.
If an error occurs, the return value is zero. Unknown language identifiers do not produce errors.
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.