建设多语种网站 [英] Building multilingual site

查看:187
本文介绍了建设多语种网站的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我计划建立一个新的多语言网站,并正在考虑对SEO的影响。

当用户进入到首次域,他的语言设置被检测,并基于该,语言设置,他被重定向到该网站的适当的语言版本并的Cookie。如果一个不同的会话期间,用户冲浪到域,被检测到的cookie和用户被重定向到相应的国家/语言页面。同时,用户能够手动改变设置的语言(以及因此该cookie得到改变太)。

首先,如果我做一个的重定向网页(如果用户没有的Cookie),将谷歌惩罚我这样做呢?

第二,如果我存储我的语言文件夹中 www.mydomain.com/en-us/page.html www.mydomain.com/cs-cz/page.html ,将谷歌抓取通过整个事情,或只是默认的语言(意思是,如果我无法检测到的语言或别'T有我在那种语言的网站,我选择英语)?

在此先感谢,
的Ondrej


解决方案

如果您拥有多语言内容,您应该遵循的谷歌的新的多语种准则。基本上,您使用子域名的不同翻译:


  

要解释它是如何工作的,让我们来看看一些例子网址:
   http://www.example.com/ - 包含一个网站的一般网页,西班牙文
   http://es-es.example.com/ - 是版本在西班牙的用户,西班牙语
   http://es-mx.example.com/ - 是版本在墨西哥用户,西班牙语
   http://en.example.com/ - 是通用的英语版本
  在所有这些页面上,我们可以使用下面的标记,以指定的语言和可选的区域:


 <链接rel =备用的hreflang =ESHREF =htt​​p://www.example.com//>
<链接rel =备用的hreflang =ES-ES的href =htt​​p://es-es.example.com//>
<链接rel =备用的hreflang =ES-MX的href =htt​​p://es-mx.example.com//>
<链接rel =备用的hreflang =ENHREF =htt​​p://en.example.com//>


  

如果您指定一个区域的子标签,我们假设你想针对该区域。
  请记住,所有这些注解要在每个网址的基础使用。你应该小心使用特定的URL,而不是网页,对于这两个链接元素。


I'm planning on building a new multilingual site and am thinking about its impact on SEO.

When a user goes to the domain for the first time, his language setting is detected and based on that, the language is set, he gets redirected to the appropriate lang version of the website and is cookied. If, during a different session, that user surfs to the domain, the cookie is detected and the user is redirected to the appropriate country/language page. At the same time, the user is able to manually change the set language (and thus the cookie gets changed too).

First off, if I do a redirect on the homepage (if the user isn't cookied), will Google penalize me for doing this?

Second, if I store my languages in folders like www.mydomain.com/en-us/page.html and www.mydomain.com/cs-cz/page.html, will Google crawl through the entire thing or just the default language (meaning, if I'm unable to detect the language or don't have my site in that language, I select English)?

Thanks in advance, Ondrej

解决方案

If you have multi-lingual content you should follow Google's new multi-lingual guidelines. Basically, you use subdomains for the different translations:

To explain how it works, let’s look at some example URLs: http://www.example.com/ - contains the general homepage of a website, in Spanish http://es-es.example.com/ - is the version for users in Spain, in Spanish http://es-mx.example.com/ - is the version for users in Mexico, in Spanish http://en.example.com/ - is the generic English language version On all of these pages, we could use the following markup to specify language and optionally the region:

<link rel="alternate" hreflang="es" href="http://www.example.com/" />
<link rel="alternate" hreflang="es-ES" href="http://es-es.example.com/" />
<link rel="alternate" hreflang="es-MX" href="http://es-mx.example.com/" />
<link rel="alternate" hreflang="en" href="http://en.example.com/" />

If you specify a regional subtag, we’ll assume that you want to target that region. Keep in mind that all of these annotations are to be used on a per-URL basis. You should take care to use the specific URL, not the homepage, for both of these link elements.

这篇关于建设多语种网站的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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