URL的一部分应该包含多语言网站的默认语言吗? [英] Should default language of multilingual website be a part of the URL?
问题描述
我已经建立了一个多语言网站,其默认语言为英语,并已翻译成更多语言.我们为子目录选择了 URL策略,因此我们的URL为例如example.com/en
,example.com/fr
等.这些URL是否应省略默认语言?因此,而不是
I have set up a multilingual website, whose default language is English and it is translated in many more languages. We have chosen for the subdirectory URL strategy, so that our URLs are like example.com/en
, example.com/fr
etc. Should the default language be omitted from those URLs? So instead of
-
example.com/en
-
example.com/fr
-
example.com/de
example.com/en
example.com/fr
example.com/de
我们可以使用
-
example.com
(默认网站语言,在这种情况下为EN) -
example.com/fr
-
example.com/de
example.com
(default site language, EN in this case)example.com/fr
example.com/de
在SEO,UX,最佳做法方面哪个更好?
Which is better in terms of SEO, UX, best practices?
p.s.我已阅读 this 和
p.s. I have read this and this but focus is given on whether translation of URLs is optimal and they do not really address my question. FYI, in my case, either the English wording is retained (example.com/en/about
, example.com/fr/about
) or in cases when this is not possible, the URL is transliterated.
推荐答案
我认为在URL中表示默认语言是更好的选择.
I think representing the default language in the URL is the better choice.
优点:
- 如果您决定更改默认语言,则不必更改URL.
- 一致性.
- 它允许您根据访问者的语言偏好从
/
重定向. - 这表明您的网站可以使用多种语言.
- 想要从URL更改语言的用户更加容易.
- 它允许外部搜索引擎的用户仅搜索默认语言的页面(
site:example.com/en/
;其中的site:example.com/
将查找所有语言的页面).
- If you decide to change the default language, you don’t have to change your URLs.
- Consistency.
- It allows you to redirect from
/
based on the visitor’s language preference. - It’s a signal that your site is available in multiple languages.
- It’s easier for users that want to change the language from the URL.
- It allows users of external search engines to search for pages in the default language only (
site:example.com/en/
; wheresite:example.com/
would find pages in all languages).
缺点:
我认为没有任何理由不在URL中包含默认语言的代码.
I can’t think of any reasons not to include the default language’s code in the URL.
这篇关于URL的一部分应该包含多语言网站的默认语言吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!