Adding Google Translate to a Webpage
With a code snippet added to the top of your page, you can insert a "Translate the Page" box on a webpage.
*This code doesn't currently work for the large home page with the middle row and bottom row blocks.
To insert the Google Translate button on a page:
- Copy the following code snippet - <div id="google_translate_element"></div>
<script type="text/javascript">// <![CDATA[
function googleTranslateElementInit() {
new google.translate.TranslateElement({pageLanguage: 'en', layout: google.translate.TranslateElement.InlineLayout.SIMPLE}, 'google_translate_element');
}
// ]]></script>
<script src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit" type="text/javascript"></script> - Go to your desired page and click Edit.
- Click on the Source Code Icon "<>" in the WYSIWYG toolbar
- Paste the code snippet at the top of the page, before any of the other code
- Click "Preview Draft"
- Click "Submit"
- Publish page.
Your button should look like this: