Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I have a website which is in 3 languages: English (primary), German and French. When a language is selected all of page's content is translated to the selected language (the page content is always in one language). My site structure looks like this:

www.mydomain.com (primary: english)
www.mydomain.com/de/ (german)
www.mydomain.com/fr/ f(rench)

Every page also contains links to other languages. Do I need to add the language attribute to the link? Like so:

<a href="wwww.mydomain.com/de/" lang="de">Deutsch</a>
<a href="wwww.mydomain.com/fr/" lang="fr">Français</a>
<a href="wwww.mydomain.com/en/" lang="en">English</a>

I've add all the appropriate meta tags, but don't know how to properly add the meta tags for content-language. Do I add all languages in the meta tag, like so:

<meta http-equiv="content-language" content="en, de, fr" />

Or do I add only the selected language:

example: if German selected

<meta http-equiv="content-language" content="de" />

What's the proper way (SEO wise) to do this?

share|improve this question
add comment

migrated from stackoverflow.com Aug 8 '11 at 8:23

This question came from our site for professional and enthusiast programmers.

1 Answer

up vote 2 down vote accepted
  1. The lang attributes are correct in the links. Since you name the language not in English you should specify the language using the lang attribute, like you did.

  2. The content-language should contain the main language of the page. You could however just add a lang attribute to the <html> element (<html lang="en">). It's a lot shorter and should work just fine on search engines (using the meta http-equiv is kind of hackish, because it should actually be set at the http level, like the name implied).

share|improve this answer
    
so i should put only the current selected language and not all languages..right? like this: <html lang="selectedLanguage"> ? –  jernej Aug 7 '11 at 20:05
2  
yep. no list. Otherwise search engines and others still wouldn't know which language the current page is in. –  Gerben Aug 7 '11 at 20:23
    
thanks for the help –  jernej Aug 7 '11 at 20:23
1  
Adding to this answer (not worth creating a new one): googlewebmastercentral.blogspot.com/2010/03/… is a good reference... –  Mike Hudson Aug 8 '11 at 2:40
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.