Hi, I'd like to use Google translate Element -> http://translate.google.com/translate_tools
I tried to do it 2 ways:
1) I just copy and paste whole code to Page.ss template
<div id="google_translate_element"></div><script>
function googleTranslateElementInit() {
new google.translate.TranslateElement({
pageLanguage: 'pl'
}, 'google_translate_element');
}
</script><script src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
2) I add the <div id="google_translate_element"></div><script> to the Page.ss and JS to the Page Controller
Requirements::javascript("http://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit");
Requirements::customScript(<<<JS
function googleTranslateElementInit() {
new google.translate.TranslateElement({pageLanguage: "pl"}, "google_translate_element");
};
JS
);
It works in IE 8.0 but doesn't works in FF, Chrome, Opera...
Have you got any ideas... the code works on other not SS sites :(
site is here -> http://87.207.57.202/boston/