-tag to translate Chrome? Or does Chrome also analyze the words use...">

Do I need a "lang" tag to translate to Chrome?

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

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

What when I use several languages?

0
source share
1 answer

The Chrome browser can identify the language of the page by looking at several 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, you 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>
0

Source: https://habr.com/ru/post/1630053/


All Articles