Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

This macro extracts a primary language identifier from a language identifier.

Syntax

WORD PRIMARYLANGID( 
  WORD 
lgid 
); 

Parameters

lgid

Value that specifies the language identifier. This value is a combination of a primary language identifier and a secondary language identifier and is usually created by using the MAKELANGIDmacro.

Return Value

The return value is a primary language identifier. The following table shows the primary language identifiers that are defined.

LANG_AFRIKAANS

LANG_KONKANI

LANG_ALBANIAN

LANG_KOREAN

LANG_ARABIC

LANG_LATVIAN

LANG_ARMENIAN

LANG_LITHUANIAN

LANG_ASSAMESE

LANG_MACEDONIAN

LANG_AZERI

LANG_MALAY

LANG_BASQUE

LANG_MALAYALAM

LANG_BELARUSIAN

LANG_MANIPURI

LANG_BENGALI

LANG_MARATHI

LANG_BULGARIAN

LANG_NEPALI

LANG_CATALAN

LANG_NEUTRAL

LANG_CHINESE

LANG_NORWEGIAN

LANG_CROATIAN

LANG_ORIYA

LANG_CZECH

LANG_POLISH

LANG_DANISH

LANG_PORTUGUESE

LANG_DUTCH

LANG_PUNJABI

LANG_ENGLISH

LANG_ROMANIAN

LANG_ESTONIAN

LANG_RUSSIAN

LANG_FAEROESE

LANG_SANSKRIT

LANG_FARSI

LANG_SERBIAN

LANG_FINNISH

LANG_SINDHI

LANG_FRENCH

LANG_SLOVAK

LANG_GEORGIAN

LANG_SLOVENIAN

LANG_GERMAN

LANG_SPANISH

LANG_GREEK

LANG_SWAHILI

LANG_GUJARATI

LANG_SWEDISH

LANG_HEBREW

LANG_TAMIL

LANG_HINDI

LANG_TATAR

LANG_HUNGARIAN

LANG_TELUGU

LANG_ICELANDIC

LANG_THAI

LANG_INDONESIAN

LANG_TURKISH

LANG_ITALIAN

LANG_UKRAINIAN

LANG_JAPANESE

LANG_URDU

LANG_KANNADA

LANG_UZBEK

LANG_KASHMIRI

LANG_VIETNAMESE

LANG_KAZAK

 

Remarks

The PRIMARYLANGIDmacro is defined as follows:

Copy Code
#define PRIMARYLANGID(lgid)	((WORD  )(lgid) & 0x3ff) 

For more information about language identifiers and locales, see Language Identifiers and Locales.

Requirements

Header winnt.h
Windows Embedded CE Windows CE .NET 4.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also