[Theme: Thematic] how to echo google script for translate in functions php?
-
Hi there,
Really noob question: I’m working my way through the thematic theme and am looking to insert the script that you get from google to provide a translation widget. My PHP is still extremely shaky and I’d love some advice if possible?
So, I need to get this script:
<div id=”google_translate_element”></div><script>
function googleTranslateElementInit() {
new google.translate.TranslateElement({
pageLanguage: ‘en’,
gaTrack: true,
layout: google.translate.TranslateElement.InlineLayout.SIMPLE
}, ‘google_translate_element’);
}
</script><script src=”//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit”></script>attached to the thematic_header action hook.
(I’d rather do it this way than install a translate plugin if possible)
Any advice or even a nudge in the right direction would be hugely appreciated!
- The topic ‘[Theme: Thematic] how to echo google script for translate in functions php?’ is closed to new replies.