Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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!!

like image 381
Zane Z Avatar asked Jun 17 '15 13:06

Zane Z


2 Answers

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.

like image 162
Bob Avatar answered Oct 16 '22 08:10

Bob


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.

like image 1
Zane Z Avatar answered Oct 16 '22 07:10

Zane Z