0

I read the question at What is the HTML5 alternative to the obsolete meta http-equiv=content-language. but it does not answer my question. So, if I have a simple site of 4 index pages, each one in a different language, how do I specify the language? "Consider specifying the language on the root element instead" means to specify at every div?

<META HTTP-EQUIV="Content-Language" content="EN">
Community
  • 1
  • 1
Claudiu Creanga
  • 8,031
  • 10
  • 71
  • 110
  • 3
    Going by http://stackoverflow.com/questions/8116812/meta-http-equiv-content-language-is-obsolete#comment9958907_8117750, you just need to set it in the `html` tag of each page. – JAB Jul 30 '12 at 18:00
  • ok. now I understand. I did not know that html has this attribute. thanks! – Claudiu Creanga Jul 30 '12 at 18:06

2 Answers2

1

So, it mus look like that:

<html lang="en-GB">
Claudiu Creanga
  • 8,031
  • 10
  • 71
  • 110
0

According to the W3C recommendation you should declare the primary language for each Web page with the lang attribute inside the tag, like this:

<html lang="en"> ... </html>

In HTML5 you can specify a language to any element. This way you can have multiple languages on the same page. And over ride the primary language for a specific element. Read More Here

And here are all of the supported language codes:

Code    Language (region)
af      Afrikaans
ar-ae   Arabic (U.A.E.)
ar-bh   Arabic (Bahrain)
ar-dz   Arabic (Algeria)
ar-eg   Arabic (Egypt)
ar-iq   Arabic (Iraq)
ar-jo   Arabic (Jordan)
ar-kw   Arabic (Kuwait)
ar-lb   Arabic (Lebanon)
ar-ly   Arabic (Libya)
ar-ma   Arabic (Morocco)
ar-om   Arabic (Oman)
ar-qa   Arabic (Qatar)
ar-sa   Arabic (Saudi Arabia)
ar-sy   Arabic (Syria)
ar-tn   Arabic (Tunisia)
ar-ye   Arabic (Yemen)
be      Belarusian
bg      Bulgarian
ca      Catalan
cs      Czech
da      Danish
de      German (Standard)
de-at   German (Austria)
de-ch   German (Switzerland)
de-li   German (Liechtenstein)
de-lu   German (Luxembourg)
el      Greek
en      English
en-au   English (Australia)
en-bz   English (Belize)
en-ca   English (Canada)
en-gb   English (United Kingdom)
en-ie   English (Ireland)
en-jm   English (Jamaica)
en-nz   English (New Zealand)
en-tt   English (Trinidad)
en-us   English (United States)
en-za   English (South Africa)
es      Spanish (Spain)
es-ar   Spanish (Argentina)
es-bo   Spanish (Bolivia)
es-cl   Spanish (Chile)
es-co   Spanish (Colombia)
es-cr   Spanish (Costa Rica)
es-do   Spanish (Dominican Republic)
es-ec   Spanish (Ecuador)
es-gt   Spanish (Guatemala)
es-hn   Spanish (Honduras)
es-mx   Spanish (Mexico)
es-ni   Spanish (Nicaragua)
es-pa   Spanish (Panama)
es-pe   Spanish (Peru)
es-pr   Spanish (Puerto Rico)
es-py   Spanish (Paraguay)
es-sv   Spanish (El Salvador)
es-uy   Spanish (Uruguay)
es-ve   Spanish (Venezuela)
et      Estonian
eu      Basque
fa      Farsi
fi      Finnish
fo      Faeroese
fr      French (Standard)
fr-be   French (Belgium)
fr-ca   French (Canada)
fr-ch   French (Switzerland)
fr-lu   French (Luxembourg)
ga      Irish
gd      Gaelic (Scotland)
he      Hebrew
hi      Hindi
hr      Croatian
hu      Hungarian
id      Indonesian
is      Icelandic
it      Italian (Standard)
it-ch   Italian (Switzerland)
ja      Japanese
ji      Yiddish
ko      Korean
ko      Korean (Johab)
ku      Kurdish
lt      Lithuanian
lv      Latvian
mk      Macedonian (FYROM)
ml      Malayalam
ms      Malaysian
mt      Maltese
nl      Dutch (Standard)
nl-be   Dutch (Belgium)
nb      Norwegian (Bokmål)
nn      Norwegian (Nynorsk)
no      Norwegian
pa      Punjabi
pl      Polish
pt      Portuguese (Portugal)
pt-br   Portuguese (Brazil)
rm      Rhaeto-Romanic
ro      Romanian
ro-md   Romanian (Republic of Moldova)
ru      Russian
ru-md   Russian (Republic of Moldova)
sb      Sorbian
sk      Slovak
sl      Slovenian
sq      Albanian
sr      Serbian
sv      Swedish
sv-fi   Swedish (Finland)
th      Thai
tn      Tswana
tr      Turkish
ts      Tsonga
uk      Ukrainian
ur      Urdu
ve      Venda
vi      Vietnamese
xh      Xhosa
zh-cn   Chinese (PRC)
zh-hk   Chinese (Hong Kong)
zh-sg   Chinese (Singapore)
zh-tw   Chinese (Taiwan)
zu      Zulu
rhodesit
  • 41
  • 8