homepage Welcome to WebmasterWorld Guest from 54.205.247.203
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Visit PubCon.com
Home / Forums Index / Google / Google SEO News and Discussion
Forum Library, Charter, Moderators: Robert Charlton & aakk9999 & brotherhood of lan & goodroi

Google SEO News and Discussion Forum

    
Google using hreflang attribute for language recognition?
encyclo




msg:3847677
 3:25 am on Feb 12, 2009 (gmt 0)

On one English-language site on a .ca domain I have a link to a different site in the following format:

<a href="http://www.example.ca/" lang="fr" hreflang="fr">Example</a>

Explanation of the above markup: lang="fr" refers to the language used for the text between the anchor tags ("Example" in this instance), and hreflang="fr" refers to the language used on the linked page.

The linked domain example.ca has a robots.txt exclusion so the entire site is not (and has never been) accessible to Googlebot. When searching for the linked domain in google.ca and set to English, the URL listing is in the following format:

Example - [ Translate this page ]
www.example.ca/ - Similar pages

I'm not aware of any other backlinks to the example.ca domain. So the SERP shows my link text as the page title (the actual page title is different, but is not available to Googlebot), and no snippet is shown as Googlebot doesn't know the page content. All this is standard stuff.

However, why does Google show the "Translate this page" link, correctly offering a French to English translation?

The only hypothesis I have is that Googlebot recognizes hreflang="fr" in my link, because nothing else indicates the language used on the page, and the linking domain is not in the same language as the linked domain.

Anyone else experienced this?

 

tedster




msg:3847711
 5:11 am on Feb 12, 2009 (gmt 0)

That's a solid observation. Next time Google offers to translate a page into English for me that doesn't need translating (that seems to happen a decent amount of time) I'm going to check into this and other possible reasons.

encyclo




msg:3848223
 7:28 pm on Feb 12, 2009 (gmt 0)

Another possibility is that Google recognizes the
lang="fr" referring to the link text, and makes the assumption about the contents of the robots-excluded page from the language of the inbound link text, not the hreflang attribute. We do know that Google understands and uses lang at page-level, I think we can assume it will use it at individual element level too.

Certainly the above example shows that it is useful to use the right markup when, for example, if you have links to different language versions of your site.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Google / Google SEO News and Discussion
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved