使用Cookies搜索引擎进行的本地化是否兼容? [英] Is localization using Cookies search engine compatible?

查看:80
本文介绍了使用Cookies搜索引擎进行的本地化是否兼容?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在对网站进行本地化.我本来打算将cookie设置为首选语言,然后显示相应的语言.而且,如果未设置cookie,它将使用用户浏览器设置的首选语言标题-如果未设置标题,则默认为英语.

那么-Google的机器人如何工作?它将以所有在标题中设置的不同语言对每个网站进行一次爬网,以便获取网站的每个版本,甚至设置标题吗?如果没有,那么我是否必须重新组织所有这些以便使用基于URL的语言选择器(www.domain.com/en/page.html www.domain.com/fr/page.html).

解决方案

据我所知,Google不会使用Cookie.直到最近,它也没有使用JavaScript,但是他们现在已经开始使用它了,尽管我不能说它的效果如何(可能不是很好).除了Flash(它也只从中获取文本和链接)之外,唯一消耗的是文本和超链接.

我的感觉是使用了以下内容:

1)TLD/子域(用于从子域确定语言的正则表达式)

2)内容语言"的HTTP标头

3)语言检查(它们确实有翻译器,因此必须能够执行此操作)

4)其他TLD的入站链接

5)网站站长工具-可以在其中设置位置

最好的方法可能是将所有这些东西结合使用,并使用某种评分系统来确定哪些文档(页面/域)是基于语言的,但是直到Google让人们使用webmastertools时,它才真正起作用. /p>

要记住的一件事是,网络上的大部分流量都流向少数几个网站,因此,如果您可以手动掩盖这些内容,则可能会使生活变得更轻松.

干杯柯

I'm in the process of localizing a website. I was going to go the way of setting a cookie to the preferred language, and then display the respective language. And, if no cookie was set it would use the preferred language header, as set by the user's browser - and if the header was not set then it would default to English.

So - how does Google's bot work? Will it crawl all websites once each with a different language set in the headers so that it can get each version of the website, or does it even set headers? If not, then do I have to restructure all this so as to use a URL based language selector (www.domain.com/en/page.html www.domain.com/fr/page.html).

解决方案

As far as i know Google does not consume cookies. Up until recently it also didnt consume javascripts, but theyve started to do that now, although I cannot say how well it works (probably not well). About the only thing the do consume is text and hyperlinks, apart from flash (which it only gets text and links from too).

My feeling is that the following are used:

1) TLD/Subdomain (regex to determine language from subdomain)

2) HTTP Header for "Content-Language"

3) Language checking (they do have a translator, so must be able to do this)

4) Inbound links from other TLDs

5) Webmaster tools - its possible to set location in there

Probably the best way is to use an amalgamation of all these things and use some kind of scoring system to determine which documents (pages/domains) are language based, but it didnt really work great until Google got people using webmastertools.

One thing to bare in mind is that most of the traffic on the net goes to a handful of websites, so if you can cover these off manually maybe it might make life easier.

Cheers Ke

这篇关于使用Cookies搜索引擎进行的本地化是否兼容?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆