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-name.
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, 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.
Some common language code schemes include:
Source: IETF memo
Navigate also the hierarchy of the Linguasphere Register code-system published online by hortensj-garden.org
Within hierarchy of Linguasphere Register code-system:
Compare: 52-ABA-a Scots + Northumbrian
outer unit & 52-ABA-b "Anglo-English" outer unit
(= South Great Britain traditional varieties + Old Anglo-Irish)
Within hierarchy of Linguasphere Register code-system:
Compare: 51-AAA-a Português + Galego outer unit & 51-AAA-c Astur + Leonés outer unit, etc.