Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

454
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda