Doubt about google tanslate

Asked

Viewed 70 times

0

Good afternoon, I am with a doubt regarding google Translate, I implemented google Translate on my website, I would like to know if there is any way this bar does not appear.

inserir a descrição da imagem aqui

<script type="text/javascript">
    function googleTranslateElementInit() {
      new google.translate.TranslateElement({pageLanguage: 'pt', layout: google.translate.TranslateElement.FloatPosition.TOP_LEFT}, 'google_translate_element');

    }

    function triggerHtmlEvent(element, eventName) {
      var event;
      if (document.createEvent) {
        event = document.createEvent('HTMLEvents');
        event.initEvent(eventName, true, true);
        element.dispatchEvent(event);
      } else {
        event = document.createEventObject();
        event.eventType = eventName;
        element.fireEvent('on' + event.eventType, event);
      }
    }
    jQuery('.lang-select').click(function() {
      var theLang = jQuery(this).attr('data-lang');
      jQuery('.goog-te-combo').val(theLang);

      //alert(jQuery(this).attr('href'));
      window.location = jQuery(this).attr('href');
      location.reload();
    });
</script>

1 answer

1


Good morning buddy, try this:

.goog-te-banner-frame.skiptranslate {
  display: none !important;
} 
body {
  top: 0px !important; 
}

I couldn’t test it but I think it will solve

  • very grateful, helped a lot. Thank you

  • Not at all, friend !

  • 1 more question that maybe you can answer me, this to see the rumor of show original, ie I do not have this visible bar, I have for images, my question is to program a button for monstar orignal, for example click on the flag of portugal and the language of the website goes back to the original language.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.