Google Translate

Permalink 2 users found helpful
Just a little heads up: If you're trying to use Google's nifty little translator tool in your template, it's going to mess with your edit window.

Most of this funky behavior is because it applies a position:relative; to your body. The most obvious problem is that all your content gets pushed down. The problem is identical and related to the problem discussed here:

The simplest solution is to just turn off the translator while you're in edit mode, like so:
<?php if (!$c->isEditMode()) :?>
<div id="google_translate_element"></div><script>
   function googleTranslateElementInit() {
     new google.translate.TranslateElement({
       pageLanguage: 'en'
     }, 'google_translate_element');
</script><script src=""></script>
<? endif; ?>

View Replies:
chaplaindf replied on at Permalink Reply
I am no expert, so please forgive my ignorance. I copied the code provided and all it does is add "isEditMode..." to the block. Displacement of blocks is still the same.
alowebdk replied on at Permalink Reply
Great solution - helped me - thanks :-)
Bashfulmonk replied on at Permalink Reply
Worked great. Thanks