Add Google Translate Widget to your site.!

unnamed

Google Translate widget allow user to convert webpage in their native language.

To add this widget to your site put bellow meta tag inside <head> …. </head> section. and place bellow <div id=”google_translate_element”> tag in body section wherever you want to display widget. this code also available on Google.

<meta name=”google-translate-customization” content=”6e4db4d5f4d2558b-e0d1d81353eae122-g1ff482c45ccd2410-1e”></meta>

<div id=”google_translate_element”></div>

<script type=”text/javascript”>
function googleTranslateElementInit() {
new google.translate.TranslateElement({pageLanguage: ‘en’, layout: google.translate.TranslateElement.InlineLayout.SIMPLE, multilanguagePage: true}, ‘google_translate_element’);
}
</script><script type=”text/javascript” src=”//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit”></script>


Testing file

<html>
<head>
<meta name=”google-translate-customization” content=”6e4db4d5f4d2558b-e0d1d81353eae122-g1ff482c45ccd2410-1e”></meta>
</head>
<body>
<div id=”google_translate_element”></div><script type=”text/javascript”>
function googleTranslateElementInit() {
new google.translate.TranslateElement({pageLanguage: ‘en’, layout: google.translate.TranslateElement.InlineLayout.SIMPLE, multilanguagePage: true}, ‘google_translate_element’);
}
</script><script type=”text/javascript” src=”//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit”></script>
Copy and paste the following code snippets onto every page you want to translate
Place this meta tag before the closing
</body>
</html>


Advertisements