using Google Translate to power internationalization?
Permalink 2 users found helpful
This bit of HTML gives you a little pop-up button that prompts you to select your language:
Choose from the list, and the entire page will be translated after a few seconds. It handles a lot of languages, including non-Latin character sets--Arabic, Chinese, Hebrew, Hindi, Japanese, and Korean, to name just a few.
So here's my question: is there any way to use this with Concrete so that this code can be added in one place, but the button will appear on all pages? Also, it'd be great if every page the user loads would be translated to whatever language he chose previously.
I could add an HTML block with this code to each page, but that seems inelegant and won't effect the translation on new pages the user clicks to.
Thanks in advance for any advice/help!
<div id="google_translate_element"></div><script> function googleTranslateElementInit() { new google.translate.TranslateElement({ pageLanguage: 'en' }, 'google_translate_element'); } </script><script src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
Choose from the list, and the entire page will be translated after a few seconds. It handles a lot of languages, including non-Latin character sets--Arabic, Chinese, Hebrew, Hindi, Japanese, and Korean, to name just a few.
So here's my question: is there any way to use this with Concrete so that this code can be added in one place, but the button will appear on all pages? Also, it'd be great if every page the user loads would be translated to whatever language he chose previously.
I could add an HTML block with this code to each page, but that seems inelegant and won't effect the translation on new pages the user clicks to.
Thanks in advance for any advice/help!
you can hardcode it in your theme, or use page defaults
Add to theme HTML as mnkras suggested - seehttp://pimasheriff.org for an example.
Thanks.