MAKELANGID Macro

Public Function MAKELANGID (ByVal usPrimaryLanguage As Integer, ByVal usSubLanguage _
		As Integer) As Long
	MAKELANGID = (usSubLanguage * 1024) Or usPrimaryLanguage
End Function

Description & Usage

The MAKELANGID macro creates a language identifier. This language identifier specifies a language using a "primary" language (for example, English, Spanish, French, etc.) and a "sublanguage" or dialect of that language (for example, American English, Australian English, UK English, etc.). Keep in mind that a typical installation of Windows only supports one primary language besides the neutral language, so only a few of the language identifiers generated by MAKELANGID will be supported on any given computer.

Note that the following language/sublanguage combinations have special meanings:

Return Value

The macro returns the language identifier that represents the specified primary language and sublanguage.

Visual Basic-Specific Issues

None.

Parameters

usPrimaryLanguage
One LANG_* flag specifying the primary language. Valid flags can be found in the Constant Definitions section below. If using a user-defined primary language, this can be any value between &H200 and &H3FF inclusive.
usSubLanguage
One SUBLANG_* flag specifying the sublanguage. Valid flags can be found in the Constant Definitions section below. If using a user-defined sublanguage, this can be any value between &H20 and &H3F inclusive.

Constant Definitions

Note: Both the possible flags for usPrimaryLanguage and usSubLanguage appear below. Since the function of each flag is so obvious given its name, they are presented below without annotation.

Const LANG_NEUTRAL = &H0
Const LANG_AFRIKAANS = &H36
Const LANG_ALBANIAN = &H1C
Const LANG_ARABIC = &H1
Const LANG_BASQUE = &H2D
Const LANG_BELARUSIAN = &H23
Const LANG_BULGARIAN = &H2
Const LANG_CATALAN = &H3
Const LANG_CHINESE = &H4
Const LANG_CROATIAN = &H1A
Const LANG_CZECH = &H5
Const LANG_DANISH = &H6
Const LANG_DUTCH = &H13
Const LANG_ENGLISH = &H9
Const LANG_ESTONIAN = &H25
Const LANG_FAEROESE = &H38
Const LANG_FARSI = &H29
Const LANG_FINNISH = &HB
Const LANG_FRENCH = &HC
Const LANG_GERMAN = &H7
Const LANG_GREEK = &H8
Const LANG_HEBREW = &HD
Const LANG_HINDI = &H39
Const LANG_HUNGARIAN = &HE
Const LANG_ICELANDIC = &HF
Const LANG_INDONESIAN = &H21
Const LANG_ITALIAN = &H10
Const LANG_JAPANESE = &H11
Const LANG_KOREAN = &H12
Const LANG_LATVIAN = &H26
Const LANG_LITHUANIAN = &H27
Const LANG_MACEDONIAN = &H2F
Const LANG_MALAY = &H3E
Const LANG_NORWEGIAN = &H14
Const LANG_POLISH = &H15
Const LANG_PORTUGUESE = &H16
Const LANG_ROMANIAN = &H18
Const LANG_RUSSIAN = &H19
Const LANG_SERBIAN = &H1A
Const LANG_SLOVAK = &H1B
Const LANG_SLOVENIAN = &H24
Const LANG_SPANISH = &HA
Const LANG_SWAHILI = &H41
Const LANG_SWEDISH = &H1D
Const LANG_THAI = &H1E
Const LANG_TURKISH = &H1F
Const LANG_UKRANIAN = &H22
Const LANG_VIETNAMESE = &H2A
Const SUBLANG_NEUTRAL = &H0
Const SUBLANG_DEFAULT = &H1
Const SUBLANG_SYS_DEFAULT = &H2
Const SUBLANG_ARABIC = &H1
Const SUBLANG_ARABIC_IRAQ = &H2
Const SUBLANG_ARABIC_EGYPT = &H3
Const SUBLANG_ARABIC_LIBYA = &H4
Const SUBLANG_ARABIC_ALGERIA = &H5
Const SUBLANG_ARABIC_MOROCCO = &H6
Const SUBLANG_ARABIC_TUNISIA = &H7
Const SUBLANG_ARABIC_OMAN = &H8
Const SUBLANG_ARABIC_YEMEN = &H9
Const SUBLANG_ARABIC_SYRIA = &HA
Const SUBLANG_ARABIC_JORDAN = &HB
Const SUBLANG_ARABIC_LEBANON = &HC
Const SUBLANG_ARABIC_KUWAIT = &HD
Const SUBLANG_ARABIC_UAE = &HE
Const SUBLANG_ARABIC_BAHRAIN = &HF
Const SUBLANG_ARABIC_QATAR = &H10
Const SUBLANG_CHINESE_TRADITIONAL = &H1
Const SUBLANG_CHINESE_SIMPLIFIED = &H2
Const SUBLANG_CHINESE_HONGKONG = &H3
Const SUBLANG_CHINESE_SINGAPORE = &H4
Const SUBLANG_DUTCH = &H1
Const SUBLANG_DUTCH_BELGIAN = &H2
Const SUBLANG_ENGLISH_US = &H1
Const SUBLANG_ENGLISH_UK = &H2
Const SUBLANG_ENGLISH_AUS = &H3
Const SUBLANG_ENGLISH_CAN = &H4
Const SUBLANG_ENGLISH_NZ = &H5
Const SUBLANG_ENGLISH_EIRE = &H6
Const SUBLANG_ENGLISH_SAFRICA = &H7
Const SUBLANG_ENGLISH_JAMAICA = &H8
Const SUBLANG_ENGLISH_CARRIBEAN = &H9
Const SUBLANG_FRENCH = &H1
Const SUBLANG_FRENCH_BELGIAN = &H2
Const SUBLANG_FRENCH_CANADIAN = &H3
Const SUBLANG_FRENCH_SWISS = &H4
Const SUBLANG_FRENCH_LUXEMBOURG = &H5
Const SUBLANG_GERMAN = &H1
Const SUBLANG_GERMAN_SWISS = &H2
Const SUBLANG_GERMAN_AUSTRIAN = &H3
Const SUBLANG_GERMAN_LUXEMBOURG = &H4
Const SUBLANG_GERMAN_LIECHTENSTEIN = &H5
Const SUBLANG_ITALIAN = &H1
Const SUBLANG_ITALIAN_SWISS = &H2
Const SUBLANG_KOREAN = &H1
Const SUBLANG_KOREAN_JOHAB = &H2
Const SUBLANG_NORWEGIAN_BOKMAL = &H1
Const SUBLANG_NORWEGIAN_NYNORSK = &H2
Const SUBLANG_PORTUGUESE = &H2
Const SUBLANG_PORTUGUESE_BRAZILIAN = &H1
Const SUBLANG_SPANISH = &H1
Const SUBLANG_SPANISH_MEXICAN = &H2
Const SUBLANG_SPANISH_MODERN = &H3
Const SUBLANG_SPANISH_GUATEMALA = &H4
Const SUBLANG_SPANISH_COSTARICA = &H5
Const SUBLANG_SPANISH_PANAMA = &H6
Const SUBLANG_SPANISH_DOMINICAN = &H7
Const SUBLANG_SPANISH_VENEZUELA = &H8
Const SUBLANG_SPANISH_COLOMBIA = &H9
Const SUBLANG_SPANISH_PERU = &HA
Const SUBLANG_SPANISH_ARGENTINA = &HB
Const SUBLANG_SPANISH_ECUADOR = &HC
Const SUBLANG_SPANISH_CHILE = &HD
Const SUBLANG_SPANISH_URUGUAY = &HE
Const SUBLANG_SPANISH_PARAGUAY = &HF
Const SUBLANG_SPANISH_BOLIVIA = &H10

Back to the Macro list.
Back to the Reference section.


Last Modified: October 29, 2000
This page is copyright © 2000 Paul Kuliniewicz. Copyright Information Revised October 29, 2000
Go back to the Windows API Guide home page.
E-mail: vbapi@vbapi.com Send Encrypted E-Mail
This page is at http://www.vbapi.com/ref/m/makelangid.html