如何指定网站的语言?(HTML?) [英] How to specify language of website? (HTML?)
问题描述
如何指定页面使用某种语言以便搜索引擎能够理解?
How do I specify that a page is in a certain language so search engines can understand?
它是我放在顶部的元标记吗?如果是,您是否知道是否大多数搜索引擎都使用它来确定语言?
Is it a meta tag I put at the top? If it is, do you know if most of the search engines use this to determine language?
我已将 1 页英文内容转换为多种不同语言,并希望将该信息包含在 html 中/让搜索引擎知道他们正在处理哪种语言.
I have converted 1 page of content in english to several different languages, and would like to include that information in the html/let the search engines know which language they are dealing with.
推荐答案
快速谷歌搜索给了我这个:HTTP 和语言元数据.tl;博士
Quick google search gave me this: HTTP and meta for language. tl;dr
<html lang="en">
还有其他指定方式.如果您使用的是 apache,您可以使用 apache 的文件扩展名来根据用户代理的给定首选项提取正确的版本.例如,将您的索引页命名为 index.html.en
、index.html.jp
、index.html.de
等等..
There are other ways of specifying. If you are using apache, you can use a file extension for apache to pull the correct version based on the user-agent's given preferences. for example, name your index page index.html.en
, index.html.jp
, index.html.de
and so on...
这篇关于如何指定网站的语言?(HTML?)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!