typedef WORD LANGID; typedef DWORD LCID; typedef DWORD LCTYPE;
Each locale has a unique identifier, a 32-bit value that consists of a language identifier and a sort order identifier. The locale identifier is a standard international numeric abbreviation and has the components necessary to uniquely identify one of the installed operating system-defined locales.
The following illustration shows the format of the bits in a locale identifier.
+-------------+---------+-------------------------+
| Reserved | Sort ID | Language ID |
+-------------+---------+-------------------------+
31 20 19 16 15 0 bit
The following illustration shows the format of the bits in a language identifier.
+-------------------------+-------------------------+
| SubLanguage ID | Primary Language ID |
+-------------------------+-------------------------+
15 10 9 0 bit
Get LCID(locale indentifier)
LCID GetThreadLocale(void);
BOOL SetThreadLocale ( LCID Locale );
DWORD MAKELCID( WORD wLanguageID, WORD wSortID );for sort order identifier, please refer to link.
WORD MAKELANGID( USHORT usPrimaryLanguage, USHORT usSubLanguage );
for languange identifier constants and strings, please refer to link
SetThreadLocale(MAKELCID(MAKELANGID(LANG_GERMAN, SUBLANG_GERMAN), SORT_GERMAN_PHONE_BOOK));
WORD SORTIDFROMLCID( LCID lcid );
WORD LANGIDFROMLCID( LCID lcid );
WORD PRIMARYLANGID( WORD lgid );
WORD SUBLANGID( WORD lgid );