我需要Chrome翻译的“lang”-tag吗? [英] Do I need the "lang"-tag for Chrome translation?

查看:128
本文介绍了我需要Chrome翻译的“lang”-tag吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是否需要Chrome翻译的< html lang =de-DE> -tag?或者,Chrome还会分析body-part中使用的单词以检查页面是以哪种语言编写的?

或者是否需要添加< html lang =de-DE> - 网站divs的标签? 一种语言?

解决方案

Chrome浏览器可以通过查看多种因素来识别页面语言:

  1.字符编码。 
2. HTTP标头。
3.编码元标记。
4.分析页面上的实际字符或单词。

因此,您需要< html lang =de-DE> ; -tag。



如果你想为某些内容使用多种语言,你可以在内容中使用span或div等元素。以下是一个例子:

 < p>如果您想向印地语中的某个人致意,您会说< span郎= 喜 > नमस्ते< / span> ;.合十< / p为H. 


do I need the <html lang="de-DE">-tag for the Chrome translation? Or does Chrome also analyze the words used in the body-part to check in which language the page was written?

Or do I need to add the <html lang="de-DE">-tags at divs at the site?

An what when I use more than one language?

解决方案

The Chrome browser can identify the page language by looking at a number of factors:

1.the character encoding.
2.the HTTP headers.
3.the encoding meta tag.
4.Analysis of the actual characters or words on the page.

So yes you need <html lang="de-DE">-tag.

If you want to use multiple languages for some content u can use elements such as span or div around the content. Here is an example:

<p>If you want to wish hello to someone in hindi.You would say <span lang="hi"> नमस्ते </span>. Namaste</p>

这篇关于我需要Chrome翻译的“lang”-tag吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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