0

I did some searching and never found an answer. StackOverflow's search algorithm helped me, now that I formulated my whole post. So I thought I might as well put this post up - perhaps someone will find their way here through my search words.

Problem

My app's text content is automatically translated in the browsers. In Chrome it's actually alright - nothing weird, doesn't translate people's names. In Microsoft Edge we have a problem though. Even words in the 'correct' language are translated, and so are names.

I can't rely on user's having the correct settings in their browsers.

How to disable automatic translation in Edge?

Jammar
  • 320
  • 1
  • 13

2 Answers2

2

Solution

HTML Global attribute translate.

Put translate="no" on elements that shouldn't be translated by the browser. Translation may be on, but the content will still not be translated.

This could also be used partially, where for example I can set translate="yes" on headings but translate="no" to user-content (names, comments, whatever).

Read more here https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/translate

Jammar
  • 320
  • 1
  • 13
  • Solution found from: https://stackoverflow.com/questions/12238396/how-to-disable-google-translate-from-html-in-chrome – Jammar Jan 07 '21 at 14:10
  • 1
    Thanks for posting the solution to this issue. I suggest you try to mark your own answer to this question after 48 hrs when it is available to mark. It can help other community members in the future in similar kinds of issues. Thanks for your understanding. – Deepak-MSFT Jan 08 '21 at 03:14
2

Try adding a language attribute to your html, as <html lang="en">(*Change it according to your site language). OR You can also add translate="no" to any portion you do not want to translate, as <body translate="no">

*For more ISO language code you can visit https://www.w3schools.com/tags/ref_language_codes.asp

m24197
  • 1,038
  • 1
  • 4
  • 12