ISO 语言代码

HTML文档中的lang属性可以用来声明web页面的语言。帮助搜索引擎和浏览器正确判断文档语言。

根据W3C的推荐,每页文档中的<html>中应该声明文档使用的主要语言。 书写方法如下:

<html lang="zh">

...

</html>

XHTML中的声明方法如下:

<html xmlns="http://www.w3.org/1999/xhtml" lang="zh" xml:lang="en">

...

</html>

ISO 639-1 语言代码一览

ISO 639-1中定义了语言的缩写代码。

HTML和XHTML文档中能够使用lang和xml:lang属性。

语言代码
语言 ISO代码
Abkhazian ab
Afar aa
Afrikaans af
Albanian sq
Amharic am
Arabic ar
Aragonese an
Armenian hy
Assamese as
Aymara ay
Azerbaijani az
Bashkir ba
Basque eu
Bengali(Bangla) bn
Bhutani dz
Bihari bh
Breton br
Bulgarian bg
Burmese my
Byelorussian(Belarusian) be
Cambodian km
Catalan ca
Chinese zh
Chinese(Simplified) zh-Hans
Chinese(Traditional) zh-Hant
Corsican co
Croatian hr
Czech cs
Danish da
Dutch nl
English en
Esperanto eo
Faeroese fo
farsi fa
Fiji fj
Finnish fi
French fr
Frisian fy
Galician gl
Gaelic(Scottish) gd
Gaelic(Manx) gv
Georgian ka
German de
Greek el
Greenlandic kl
Guarani gn
Gujarati gu
Haitian Creole ht
Hausa ha
Hebrew he,iw
Hindi hi
Hungarian hu
Icelandic is
Ido io
Indonesian id,in
Interlingua ia
Interlingue ie
Inuktitut iu
Inupiak ik
Irish ga
Italian it
Japanese ja
Javanese jv
Kannada kn
Kannada kn
Kashmiri ks
Kazakh kk
Kinyarwanda (Ruanda) rw
Kirghiz ky
Kirundi (Rundi) rn
Korean ko
Kurdish ku
Laothian lo
Latin
Latvian (Lettish) lv
Limburgish ( Limburger) li
Lingala ln
Lithuanian lt
Macedonian mk
Malagasy mg
Malay ms
Malayalam ml
Maltese mt
Maori mi
Marathi mr
Moldavian mo
Mongolian mn
Nauru na
Nepali ne
Norwegian no
Occitan oc
Oriya or
Oromo (Afaan Oromo) om
Pashto (Pushto) ps
Polish pl
Portuguese pt
Punjabi pa
Punjabi qu
Quechua qu
Rhaeto-Romance rm
Romanian ro
Russian ru
Samoan sm
Sangro sg
Sanskrit sa
Serbian sr
Serbo-Croatian sh
Sesotho st
Setswana tn
Shona sn
Sichuan Yi ii
Sindhi sd
Sinhalese si
Siswati ss
Slovak sk
Slovenian sl
Somali so
Spanish es
Sundanese su
Swahili (Kiswahili) sw
Swedish sv
Tagalog tl
Tajik tg
Tamil ta
Tatar tt
Telugu te
Thai th
Tibetan bo
Tigrinya ti
Tonga to
Tsonga ts
Turkish tr
Turkmen tk
Twi tw
Uighur ug
Ukrainian uk
Urdu ur
Uzbek uz
Vietnamese vi
Volapük vo
Wallon wa
Welsh cy
Wolof wo
Xhosa xh
Yiddish yi,ji
Yoruba yo
Zulu zu