Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Meta tag for translation

Tags:

html

meta

Suppose I have 2 pages on my web site : www.mydomain.com/pageX.html in english and www.mydomain.com/fr/pageX.html being the french translation of the first

Which meta tag am I suppose to use to tell Google that the second is the translation of the first (meta information) ?

like image 559
user391552 Avatar asked Oct 02 '12 10:10

user391552


2 Answers

The only way to do this (that i'm aware of) is to tell google not to translate the page. Google uses language detection to see if the webpage is in the same language as the user, if not it provides the option to translate.

You cannot do anything fancy such as tell google to forward french users to /fr/ though, that's something you would have to manage manually.

<meta name="google" content="notranslate" />
like image 71
Lee Avatar answered Nov 19 '22 06:11

Lee


The standard way to do this would be:

<link rel="alternate" hreflang="fr" href="/fr/" title="This document in French">

… and it appears that Google support this standard.

like image 13
Quentin Avatar answered Nov 19 '22 06:11

Quentin