Jammar
Jammar

Reputation: 446

Force Edge not to automatically translate content

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?

Upvotes: 0

Views: 1895

Answers (2)

user
user

Reputation: 1070

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

Upvotes: 2

Jammar
Jammar

Reputation: 446

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

Upvotes: 2

Related Questions