4

In the last weeks I had some calls from users of my cloud application that tell me, that all labels and buttons do have strange names & descriptions. It turned out that the reason for this is the automatic translation in Microsoft Edge that is activated on their devices.

The problem: we offer a German cloud application and Edge tries to translate German into (really stupid) German. It doesn't care about <html lang="de"> and tries to translate the complete German page into another German one which is completely stupid and wrong.

How can I prevent this behavior? How can I tell Edge that this page already is in German and that it doesn't need to be translated?

This is a really stupid behavior because it completely confuses our users and we get a lot of calls from them that our application is not working correctly.

acb1980
  • 145
  • 3
  • 15
  • Hi @Zu Zhou, I've now implemented both your answers (the meta tag & the additional div), but unfortunately I'm not able to test this because on my Windows VM the translation doesn't seem to be active. So I can only test this on a machine of a client, and the people that had the problem have now deactivated translation. So I need to wait if the problem occurs again or not. – acb1980 Sep 18 '20 at 09:20

2 Answers2

5

I guess you're using Edge Chromium. Correct me if I guess wrong. notranslate class doesn't work for me. You can add this line inside <head></head> to disable automatic translation in browser:

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

I've tested and it can work well in Edge Chromium and Chrome.

Reference link: How to disable google translate from html in chrome

Yu Zhou
  • 11,532
  • 1
  • 8
  • 22
4

Add a div like:-

<body>
<div class = "notranslate">
<!--Your HTML content here-->
</div>
</body>

For more information refer: https://learn.microsoft.com/en-us/azure/cognitive-services/translator/prevent-translation

user12137152
  • 732
  • 1
  • 5
  • 14
  • Weird. I put the class in my `` tag, refreshed the page and it worked (Didn't get prompted to translate the page). Then I **removed** the class, refreshed and... the translation message didn't pop up again either. I'm still leaving it there as a good luck charm. – IGP Mar 22 '22 at 22:22