Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

450
Views
Google Translate has stopped working on Chrome, Safari and Opera (still works on Firefox)

Some time ago the Google section translate function has stopped working on most browsers (excluding Firefox), resulting in blank page with "about:blank#blocked" address when someone click on TRANSLATE link under the post (example post, does not need to log in or register to use translate feature: https://www.elvikom.pl/hp-probook-6560b-cure-uma-hr-hpb-mv-mb-v1-sam-sie-uruchamia-t65407.html).

I found that piece of code on stackoverflow: Google Translate shows blank screen in Chrome but I do not know where to place it exactly. Tried to add it right before closing </head> tag as well as right after opening <body> tag but cannot get this code working.

My code right after opening <body> tag (still works on Firefox):

<script>
function googleSectionalElementInit() {
  new google.translate.SectionalElement({
    sectionalNodeClassName: 'goog-trans-section',
    controlNodeClassName: 'goog-trans-control',
    background: '#f4fa58'
  }, 'google_sectional_element');
}
</script>
<!-- IF S_USER_LANG eq 'pl' -->
<script src="//translate.google.com/translate_a/element.js?cb=googleSectionalElementInit&ug=section&hl=pl"></script>
<!-- ELSEIF S_USER_LANG eq 'ru' -->
<script src="//translate.google.com/translate_a/element.js?cb=googleSectionalElementInit&ug=section&hl=ru"></script>
<!-- ELSEIF S_USER_LANG eq 'en' -->
<script src="//translate.google.com/translate_a/element.js?cb=googleSectionalElementInit&ug=section&hl=en"></script>
<!-- ELSEIF S_USER_LANG eq 'sl' -->
<script src="//translate.google.com/translate_a/element.js?cb=googleSectionalElementInit&ug=section&hl=sl"></script>
<!-- ELSEIF S_USER_LANG eq 'de' -->
<script src="//translate.google.com/translate_a/element.js?cb=googleSectionalElementInit&ug=section&hl=de"></script>
<!-- ELSEIF S_USER_LANG eq 'it' -->
<script src="//translate.google.com/translate_a/element.js?cb=googleSectionalElementInit&ug=section&hl=it"></script>
<!-- ENDIF -->

And my template (html) code:

<div class="goog-trans-section">{postrow.MESSAGE}<br /><br /><a href="javascript:void(0);"><span class="goog-trans-control"></span></a></div>
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Just a moment after I have posted my question, I've tried to put that suggested code inside the function googleSectionalElementInit() function. So my current code right after opening <body> tag looks like that:

<script>
function googleSectionalElementInit() {
  new google.translate.SectionalElement({
    sectionalNodeClassName: 'goog-trans-section',
    controlNodeClassName: 'goog-trans-control',
    background: '#f4fa58'
  }, 'google_sectional_element');
 $(document).ready(function(){
  setTimeout( function() {
   $(".goog-te-gadget-link").click(function(){
    $(this).attr('href', 'javascript:;');
   });
  }, 2000);
 });
}
</script>
<!-- IF S_USER_LANG eq 'pl' -->
<script src="//translate.google.com/translate_a/element.js?cb=googleSectionalElementInit&ug=section&hl=pl"></script>
<!-- ELSEIF S_USER_LANG eq 'ru' -->
<script src="//translate.google.com/translate_a/element.js?cb=googleSectionalElementInit&ug=section&hl=ru"></script>
<!-- ELSEIF S_USER_LANG eq 'en' -->
<script src="//translate.google.com/translate_a/element.js?cb=googleSectionalElementInit&ug=section&hl=en"></script>
<!-- ELSEIF S_USER_LANG eq 'sl' -->
<script src="//translate.google.com/translate_a/element.js?cb=googleSectionalElementInit&ug=section&hl=sl"></script>
<!-- ELSEIF S_USER_LANG eq 'de' -->
<script src="//translate.google.com/translate_a/element.js?cb=googleSectionalElementInit&ug=section&hl=de"></script>
<!-- ELSEIF S_USER_LANG eq 'it' -->
<script src="//translate.google.com/translate_a/element.js?cb=googleSectionalElementInit&ug=section&hl=it"></script>
<!-- ENDIF -->

And now the translate function works perfectly fine on Chrome, Opera and Safari :)

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!