Wordpress

Adding the translator into your header file is slightly different, due to the way WordPress handles shortcodes outside of pages, posts, and sidebars. You will need to open 'header.php' and then insert <?php echo do_shortcode ('[google-translator]'); ?> in the area where you want to add it.

***

<div id="google_translate_element"></div><script type="text/javascript">
function googleTranslateElementInit() {
new google.translate.TranslateElement({pageLanguage: 'de', layout: google.translate.TranslateElement.FloatPosition.TOP_RIGHT}, 'google_translate_element');
}
</script><script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>

***