您的位置:首页 > 理论基础 > 计算机网络

Language Codes & Request.ServerVariables("HTTP_ACCEPT_LANGUAGE")

2008-04-03 19:20 441 查看
Knowing the languages selected in the browser of our visitors may be a very important data we may used to redirect the user to a specific page in the corresponding language, or to display specific information directed to the user (as for example the most suitable ad).
The basic command we will use to know the languages selected in the browser is this one:
Request.ServerVariables("HTTP_ACCEPT_LANGUAGE")

You may get the complete code here. The list of languages may be obtained here.

The following table lists all the possible language codes used to specify various system settings.

af Afrikaans sq Albanian
ar-sa Arabic (Saudi Arabia) ar-iq Arabic (Iraq)
ar-eg Arabic (Egypt) ar-ly Arabic (Libya)
ar-dz Arabic (Algeria) ar-ma Arabic (Morocco)
ar-tn Arabic (Tunisia) ar-om Arabic (Oman)
ar-ye Arabic (Yemen) ar-sy Arabic (Syria)
ar-jo Arabic (Jordan) ar-lb Arabic (Lebanon)
ar-kw Arabic (Kuwait) ar-ae Arabic (U.A.E.)
ar-bh Arabic (Bahrain) ar-qa Arabic (Qatar)
eu Basque bg Bulgarian
be Belarusian ca Catalan
zh-tw Chinese (Taiwan) zh-cn Chinese (PRC)
zh-hk Chinese (Hong Kong, S.A.R. China) zh-sg Chinese (Singapore)
hr Croatian cs Czech
da Danish nl Dutch (Standard)
nl-be Dutch (Belgium) en English
en-us English (United States) en-gb English (Great Britain)
en-au English (Australia) en-ca English (Canada)
en-nz English (New Zealand) en-ie English (Ireland)
en-za English (South Africa) en-jm English (Jamaica)
en English (Caribbean) en-bz English (Belize)
en-tt English (Trinidad) et Estonian
fo Faeroese fa Farsi
fi Finnish fr French (Standard)
fr-be French (Belgium) fr-ca French (Canada)
fr-ch French (Switzerland) fr-lu French (Luxembourg)
gd Gaelic (Scotland) gd-ie Gaelic (Ireland)
de German (Standard) de-ch German (Switzerland)
de-at German (Austria) de-lu German (Luxembourg)
de-li German (Liechtenstein) el Greek
he Hebrew hi Hindi
hu Hungarian is Icelandic
in Indonesian it Italian (Standard)
it-ch Italian (Switzerland) ja Japanese
ko Korean ko Korean (Johab)
lv Latvian lt Lithuanian
mk FYRO Macedonian ms Malaysian
mt Maltese no Norwegian (Bokmal)
no Norwegian (Nynorsk) pl Polish
pt-br Portuguese (Brazil) pt Portuguese (Standard)
rm Rhaeto-Romanic ro Romanian
ro-mo Romanian (Moldavia) ru Russian
ru-mo Russian (Moldavia) sz Sami (Lappish)
sr Serbian (Cyrillic) sr Serbian (Latin)
sk Slovak sl Slovenian
sb Sorbian es Spanish (Spain – Traditional)
es-mx Spanish (Mexico) es Spanish (Spain – Modern)
es-gt Spanish (Guatemala) es-cr Spanish (Costa Rica)
es-pa Spanish (Panama) es-do Spanish (Dominican Republic)
es-ve Spanish (Venezuela) es-co Spanish (Colombia)
es-pe Spanish (Peru) es-ar Spanish (Argentina)
es-ec Spanish (Ecuador) es-cl Spanish (Chile)
es-uy Spanish (Uruguay) es-py Spanish (Paraguay)
es-bo Spanish (Bolivia) es-sv Spanish (El Salvador)
es-hn Spanish (Honduras) es-ni Spanish (Nicaragua)
es-pr Spanish (Puerto Rico) sx Sutu
sv Swedish sv-fi Swedish (Finland)
th Thai ts Tsonga
tn Tswana tr Turkish
uk Ukrainian ur Urdu
ve Venda vi Vietnamese
xh Xhosa ji Yiddish
zu Zulu
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: