Google Translate Not working in Any IE but works in Firefox and GoogleChrome

15.8k views Asked by At

I have tested this page in IE, Firefox, and Google Chrome. It works in all except IE. Can someone please tell me how to fix this, I have tried just about everything I could for the last two days.

TRY THIS TEST PAGE

<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
</head>

<body>
Hello
<div id="google_translate_element"></div>
        <script type="text/javascript">
        function googleTranslateElementInit() {
                new google.translate.TranslateElement({pageLanguage: 'en', layout: google.translate.TranslateElement.InlineLayout.SIMPLE}, 'google_translate_element');
            }
        </script>
        <script type="text/javascript" src="http://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
</body>
</html>

When selecting a language it shows the choice picked but never completes the translation.. But works in FireFox and Google Chrome. IE just sits at 0% and just keeps spinning. Is anyone else experiencing the same issue?

The error it throws in the console when switching languages is this:

XMLHttpRequest: Network Error 0x2f1c, Could not complete the operation due to error 00002f1c.

enter image description here

enter image description here

enter image description here

I have tried many things even going as far as something like this:

<div id="google_translate_element"></div>
        <script type="text/javascript">
        $.ajax({
  url:"http://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit",
  type:"POST",
  data:"google_translate_element",
  contentType:"application/json; charset=utf-8",
  dataType:"json",
  success: function googleTranslateElementInit() {
                new google.translate.TranslateElement({pageLanguage: 'en', layout: google.translate.TranslateElement.InlineLayout.SIMPLE}, 'google_translate_element');
            }

  })
        </script>

Please any help would be greatly appreciated!!

8

There are 8 answers

0
Drivec On

I would comment if i had enough rep.

I have the same issue, works fine on Chrome and Firefox but it just fails on IE.

An alternative is the Microsoft Bing translator http://www.microsoft.com/translator/getstarted.aspx.

If anyone could help us that would be appreciated

0
AJW On

I'd also comment if I had enough rep.

I have the same issue as well. For me, it started after IE updated to v.11.0.9600.17843 (update version 11.0.20). Google Translate widget was working fine in IE before that.

3
Zane Z On

I have finally found the issue!! The new security update broke the translator. If you delete KB3058515 this will fix the problem. But now we have to figure out how to make it work with the update since users will not delete there security updates.

0
Elwyn Jones On

I have the same issue, I think this is more a case of having MS not following the same rules that Mozilla and Google do to achieve the same results. This is really an IE issue that they should resolve, They are one of three that are trying to protect users from the method by which http can strip https security. One example was given where a user logs in to his bank using http which then redirects to https giving someone access to redirect the user to a false bank account to gather his details. I am still laughing at the very idea that a bank would use http transport anyway. Banks should use secure connections for everything. But it doesn't solve our problem. I have advised my clients to use Firefox or Chrome until this matter is resolved, which is outside my ability.

0
Geoff S On

I had the same issue and found some other discussions. It is related to the introduction of support for HTTP Strict Transport Security standard (HSTS) in IE11, included in security update KB 3058515.

It looks like your options are:

  • get users to remove or disable KB 3058515
  • get Google to add their sites to Microsoft's HSTS preload list
  • get Google to enable HSTS through use of the Strict-Transport-Security HTTP header
  • (possibly) get your site added to Microsoft's HSTS preload list

More discussion here: http://answers.microsoft.com/en-us/ie/forum/ie11-windows_7/google-translate-widget-not-working-in-internet/55f835e2-6460-46f3-8e71-9dbf3c3f5e49

Microsoft KB article: https://support.microsoft.com/en-us/kb/3071338

0
Jeremy On

This issue is tied to a June 2015 update of Internet Explorer. By downloading the July 2015 release: Version 11.0.9600.17914, Update Versions 11.0.21 (KB3065822) - the issue seems to have been resolved. Microsoft is aware of the issue as noted in their forums. I believe they addressed it with a fix in the July release.

A recommended fix for user might be to have them update their browsers, if auto update is not turned on.

1
Bob On

In the code there is a link to the google translate file

//translate.google.com...

When I put the full address into my browser it automatically downloaded a text file. I converted the .txt file into to a .js file then replaced the web link with a link to the js file and it worked fine. I hope this helps.

0
Dave Moore On

I recently hit this issue on a website. Translator showed up normally in Firefox, Chrome and on mobile browsers, but nothing in IE 8-11. Our solution was a pretty simple fix (which I imagine will not be the care for most). We literally just had to flip the script link and the script function.

<script src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
<script>
  function googleTranslateElementInit() {
    new google.translate.TranslateElement(
        {pageLanguage: 'en'},
        'google_translate'
    );

    jQuery('.goog-logo-link').css('display', 'none');
    jQuery('.goog-te-gadget').css('font-size', '0');
  }
</script>

Became:

<script>
  function googleTranslateElementInit() {
    new google.translate.TranslateElement(
        {pageLanguage: 'en'},
        'google_translate'
    );

    jQuery('.goog-logo-link').css('display', 'none');
    jQuery('.goog-te-gadget').css('font-size', '0');
  }
</script>
<script src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>

This fixed the issue of not displaying in IE, but also didn't hurt Chrome or Firefox.