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" />
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" />
The
lang
attribute may be placed on any element, not just the roothtml
element ormeta 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 thoselang
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 inhttp-equiv="content-language"
(try it and see).As for whether search engines will honour multiple instances of
meta name="description"
in multiple languages (with appropriatelang
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.Check this post from Google Webmaster Central Blog: http://googlewebmastercentral.blogspot.com.es/2010/03/working-with-multilingual-websites.html
"Google tries to determine the main languages of each one of your pages. You can help to make language recognition easier if you stick to only one language per page and avoid side-by-side translations. Although Google can recognize a page as being in more than one language, we recommend using the same language for all elements of a page: headers, sidebars, menus, etc. Keep in mind that Google ignores all code-level language information, from “lang” attributes to Document Type Definitions (DTD). Some web editing programs create these attributes automatically, and therefore they aren’t very reliable when trying to determine the language of a webpage."
Some info about multi languages websites:
Since html "lang" attribute doesn't allow define multiple languages, and meta attribute for specify language is obsolete, according to W3 recommendations, it's better to specify language in the HTTP header.
Like the meta element with the http-equiv attribute set to Content-Language, the value of the HTTP header can be a comma-separated list of language tags
See: http://tools.ietf.org/html/rfc2616#section-14.12
As RFC2616 says:
If you go to http://validator.w3.org/check and try to validate this:
W3 validator tool says:
Then, if lang attribute on html tag doens't allow multiple languages, I think your best try will be specify it in HTTP header