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.
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.
There are 183 two-letter codes registered as of June 2021. See: List of ISO 639 language codes
See: List of ISO 639-2 codes
See: List of ISO 639-3 codes
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)
Compare: 51-AAA-a Português + Galego outer unit & 51-AAA-c Astur + Leonés outer unit, etc.