A language code is a code that assigns letters or numbers as identifiers or classifiers for languages. These codes may be used to organize library collections or presentations of data, to choose the correct localizations and translations in computing, and as a shorthand designation for longer forms of language names.

Difficulties of classification

Language code schemes attempt to classify the complex world of human languages, dialects, and variants. Most schemes make some compromises between being general and being complete enough to support specific dialects.

For example, Spanish is spoken in over 20 countries in North America, Central America, the Caribbean, and Europe. 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 variation.

Common schemes

{| class="wikitable"

|+List of some common language code schemes

|- style="vertical-align:top"

! Scheme

! Notes

! Examples for English

! Examples for Spanish

|- style="vertical-align:top"

| Glottolog codes

| Created for minority languages as a scientific alternative to the industrial ISO 639‑3 standard.<br />Intentionally do not resemble abbreviations.

|

  • stan1293 – standard English
  • macr1271 – macro-English (Modern English, incl. creoles)
  • midd1317 – Middle English
  • merc1242 – Mercian (Middle to Modern English)
  • olde1238 – Old English
  • angl1265 – Anglian (Old to Modern English, incl. Scots)

|

  • stan1288 – standard Spanish
  • olds1249 – Old Spanish
  • cast1243 – Castilic (Old to Modern Spanish, incl. Extremaduran and creoles)

|- style="vertical-align:top"

| IETF language tag

| An IETF best practice, specified by BCP 47, for language tags easy to parse by computer. The tag system is extensible to region, dialect, and private designations. It references ISO 639, ISO 3166 and ISO 15924.

|

  • en – English, as shortest ISO 639 code.
  • en-CA – English as used in Canada (CA is the ISO 3166‑1 country code for Canada) containing over 32,000 codes within 10 sectors of reference, covering the world's languages and speech communities.

|

Within hierarchy of Linguasphere Register code-system:

  • 5= Indo-European phylosector
  • 52= Germanic phylozone
  • 52-A Germanic set
  • 52-AB English + Anglo-Creole chain
  • 52-ABA English net
  • 52-ABA-c Global English (outer unit)<br /> 52-ABA-ca to 52-ABA-cwe (186 varieties)

Compare: 52-ABA-a Scots + Northumbrian <br />outer unit & 52-ABA-b "Anglo-English" outer unit <br />(= South Great Britain traditional varieties + Old Anglo-Irish)

|

Within hierarchy of Linguasphere Register code-system:

  • 5= Indo-European phylosector
  • 51= Romanic phylozone
  • 51-A Romance set
  • 51-AA Romance chain
  • 51-AAA West Romance net
  • 51-AAA-b Español/Castellano (outer unit) <br /> 51-AAA-ba to 51-AAA-bkk (58 varieties)

Compare: 51-AAA-a Português + Galego outer unit & 51-AAA-c Astur + Leonés outer unit, etc.

|- style="vertical-align:top"

| SIL codes (10th–14th editions)

| Codes created for use in the Ethnologue, a publication of SIL International that lists language statistics. The publication now uses ISO 639‑3 codes.

| ENG

| SPN

|- style="vertical-align:top"

| Verbix language codes

| Constructed codes starting with old SIL codes and adding more information.

|ENG

|SPN

|}

See also

  • Accept-Language
  • Codes for constructed languages
  • Country code
  • Flag icons for languages
  • List of ISO 639-1 codes - codes for common languages
  • List of ISO 639-2 codes - expanded 3 character code list of all languages coded by ISO
  • List of ISO 639-3 codes
  • Locale (computer software)

References

  • List of usual language codes and its variants