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:http://www.concrete5.org/community/forums/themes/template-pushing-c...
The simplest solution is to just turn off the translator while you're in edit mode, like so:
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:http://www.concrete5.org/community/forums/themes/template-pushing-c...
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="http://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script> <? endif; ?>
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.
Great solution - helped me - thanks :-)
Worked great. Thanks