Search code examples
htmlmeta-tags

HTML: Multiple language meta descriptions?


How can I set two language meta descriptions to my website?

Is this code google valid?

<meta name="description" lang="en" content="english blablabla" />
<meta name="description" lang="hu" content="hungary blablabla" />

Solution

  • The lang attribute may be placed on any element, not just the root html element or meta name="description". So you can write <html lang="en"><body>The Chinese translation of Stack Overflow is <span lang="zh-Hans">堆叠溢位</span></body></html> and it's good to put those lang attributes in because it helps visual browsers to choose the correct fonts and audio browsers for blind people to choose the correct voice.

    Some non-Google search engines still want the obsolete <meta http-equiv="content-language"> markup (in particular Bing and Baidu reportedly still want these) but I have no idea if their implementations are standards-compliant enough to cope with two or more languages listed in http-equiv="content-language" (try it and see).

    As for whether search engines will honour multiple instances of meta name="description" in multiple languages (with appropriate lang attributes), that depends on the search engine. Google have indicated they don't like side-by-side translations, which is a pity for those of us discussing foreign languages.