XLL+ Class Library

::ResGetCountryCodeFromLangID

Translates a language ID to a country code

[C++]
int ResGetCountryCodeFromLangID(
   LANGID langid
);

Parameters

langid

Language ID. This can be formed using the MAKELANGID(...) macro.

Return value

Returns an integer representing the main country for the language and sub-language pair contained in the language ID. This normally corresponds to the international telephone dialling code for the country. Returns 0 if the lanuage ID cannot be found, or contains no main country.

Remarks

This function calls the Windows API function GetLocaleInfo(), and looks up LCTYPE LOCALE_ICOUNTRY.

Requirements

Header: xllres.h

See Also

Global resource functions