
Ask HN: Can the `lang=“en”` attribute interfere with the text content in Chrome? - fmoronzirfas
We had a wired situation and I would love to get some input from others if they encountered something similar.<p>We released a React application two weeks ago and had some great feedback on the project. Several newspapers wrote about it, we also had some online coverage, many visitors and also users who signed up.<p>The wired thing was, that about 1.5 weeks later a journalist wrote about the project and he complained in his article that our language was really bad. He pointed out two sentences. In one the German word &quot;schnapp&quot; (means grab) was exchanged for &quot;Schnaps&quot; (which is booze) and another one where &quot;Gründen&quot; was changed to &quot;gehören&quot;.<p>I did some review of the source file and we never had these words in our git history of the file. He told us that he is using Chrome (no version mentioned). The only thing out of the ordinary was that we had in our  markup the lang attribute set to English `&lt;html lang=&quot;en&quot;&gt;`. After changing only that one attribute to German he reported to us one day later that the issue was fixed.<p>So the only thing I can think of is some Chrome translation or auto correct feature or plugin changing the text from German to German.<p>Did anyone ever encounter something like this?
======
throwaway888abc
Yes, If text is lang is EN and browser is DE, translate is fired. You can
disable this.

"When Google recognizes that the contents of a page are not in the language
that the user is likely to want to read, Google often provides a link to a
translation in the search results. In general, this gives you the chance to
provide your unique and compelling content to a much larger group of users.
However, there may be situations where this is not desired. This meta tag
tells Google that you don't want us to provide a translation for this page."

<meta name="google" content="notranslate">

[https://support.google.com/webmasters/answer/79812](https://support.google.com/webmasters/answer/79812)

~~~
fmoronzirfas
The text itself was DE. The lang attribute was set to EN. I don’t know what
language defaults his browser has. I assume DE. I thought Chrome was smarter
then relying on this one attribute for translation…

------
bryanrasmussen
I suppose it's this, [https://www.howtogeek.com/407924/how-to-turn-
translation-on-...](https://www.howtogeek.com/407924/how-to-turn-translation-
on-or-off-in-chrome/) he has a German Google Chrome, your page said it was
English, he has set it to automatically translate from English to German at
some point in the past and forgot about it, or his company does it and never
told him.

~~~
fmoronzirfas
I tried to replicate this scenario on Browserstack but that didn't work. The
content of the page is in German. The Chrome built in translation showed the
language as unknown. Also most of the text seemed right he only pointed out
these two words.

