Locale, Language, and Sublanguage IDs

The following macro is defined for creating LCIDs (Winnt.h for 32-bit systems; Olenls.h for 16-bit systems and Macintosh):

//*
// LCID creation/extraction macros:
// 
// MAKELCID - construct locale ID from language ID and
// country code.
// 
#define MAKELCID(l)    ((DWORD)(((WORD)(l)) | (((DWORD)((WORD)(0))) << 16)))
 

There are two predefined LCID values. The system default locale is LOCALE_SYSTEM_DEFAULT, and the current user's locale is LOCALE_USER_DEFAULT.

Another macro constructs a LANGID:

// 
// Language ID creation/extraction macros:
// 
// MAKELANGID - Construct language ID from primary language ID and
// sublanguage ID
// 
#define MAKELANGID(p, s)            ((((USHORT)(s)) << 10) | (USHORT)(p))
 

The following three combinations of primary LANGID and sublanguage identifier (SUBLANGID) have special meanings:

Primary LANGID SUBLANGID Result
LANG_NEUTRAL SUBLANG_NEUTRAL Language neutral
LANG_NEUTRAL SUBLANG_SYS_DEFAULT System default language
LANG_NEUTRAL SUBLANG_DEFAULT User default language

For primary LANGIDs, the range 0x200 to 0x3ff is user definable. The range 0x000 to 0x1ff is reserved for system use. For SUBLANGIDs, the range 0x20 to 0x3f is user definable. The range 0x00 to 0x1f is reserved for system use.