Eckher
EckherInsightsContact
Eckher
Your guide to what's next.
Using language codes
Apr 16, 2020

Using language codes

Official language codes used on the web.

Many markup and style sheet languages and protocols (HTML, CSS, XML, HTTP, and so on) use language tags in one way or another. Those language tags specify the language of the marked up or styled text.

There are two international standards for encoding languages: ISO 639-1 two-letter language codes and ISO 639-2 three-letter codes. When looking up the language tag to use on the web, neither should be used. The official registry of language tags that should be used instead of ISO codes is the IANA Language Subtag Registry.

The table below lists the language tags according to the IANA Language Subtag Registry:

CodeName
aaAfar
abAbkhazian
aeAvestan
afAfrikaans
akAkan
amAmharic
anAragonese
arArabic
asAssamese
avAvaric
......
zunZuni
zuyZumaya
zwaZay
zybYongbei Zhuang
zygYang Zhuang
zyjYoujiang Zhuang
zynYongnan Zhuang
zypZyphe Chin
zzaZaza, Dimili, Dimli (macrolanguage), Kirdki, Kirmanjki (macrolanguage), Zazaki
zzjZuojiang Zhuang

The following codes are declared special and reserved: mis, mul, qaa..qtz, und, zxx. Excluding those, there are 8,172 language codes in total defined by the IANA Language Subtag Registry.

See also
Markup for multilingual websites
The correct markup for website localization and internationalization.
Generating data URLs in JavaScript
How to generate data URLs in JavaScript?