Language code
historyA language code is a code that assigns letters or numbers as identifiers for languages. These codes are often used to organize library collections, to choose the correct localizations and translations in computing, and as a shorthand designation for forms.
Difficulties of classification
Language code schemes attempt to classify within the complex world of human languages, dialects, and variants. Most schemes make some compromises between being general enough to be useful and complete enough to support specific dialects.
For example, most people in Central America and South America speak Spanish. Spanish spoken in Mexico will be slightly different from Spanish spoken in Peru. Different regions of Mexico will have slightly different dialects and accents of Spanish. A language code scheme might group these all as "Spanish" for choosing a keyboard layout, most as "Spanish" for general usage, or separate each dialect to allow region-specific idioms.
Common schemes
Some common language code schemes include:
{| class="wikitable" |- valign="top" ! rowspan=2 style="text-align:left"|Scheme ! rowspan=2 style="text-align:left"|Notes ! colspan=2|Examples |- valign="top" ! Codes for English ! Codes for Spanish |- valign="top" | ISO 639 | The original ISO standard from 1967 to 2002. Now obsolete, it was replaced by ISO 639-1, ISO 639-2, and ISO 639-3. Sometimes used as a shorthand for the union of all 639 standard codes. |
- en – two-letter code
- eng – three-letter code
- enm – Middle English, ca. 1100–1500
- ang – Old English, ca. 450–1100
- cpe – other English-based creoles and pidgins
- EN – English or American two-letter capital code
- esl – three-letter code
- spa – alternative three-letter code
- ES – Spanish two-letter capital code
- en
- es – Spanish
- eng – three-letter code
- enm – Middle English, ca. 1100–1500
- ang – Old English, ca. 450–1100
- cpe – other English-based creoles and pidgins
- spa – Spanish
- eng – three-letter code
- enm – Middle English, ca. 1100–1500
- aig – Antigua and Barbuda Creole English
- ang – Old English, ca. 450–1100
- svc – Vincentian Creole English
- others
- spa – Spanish
- spq – Spanish, Loreto-Ucayali
- ssp – Spanish sign language
- others
- en – English, as shortest ISO 639 code.
- en-US – English as used in the United States (US is the ISO 3166-1 country code for the United States)
- en-US-x-fandom – English with private subtag
- es – Spanish, as shortest ISO 639 code.
- es-419 – Spanish appropriate for the Latin America and Caribbean region, using the UN region code
- Country code
- Ethnologue (SIL code)
- HTML Accept-Language header
- IETF language tag
- ISO 639
- ISO, SIL, and BCP language codes for constructed languages
- Linguasphere language code