How to add google translate to your website

“No generation has had the opportunity, as we now have, to build a global economy that leaves no-one behind. It is a wonderful opportunity, but also a profound responsibility.” - Former U.S. President Bill Clinton

Posted  178 Views updated 7 months ago

One good way to attract more traffic to your website is by making your content available to other language speakers. So below is a straight forward tip on how to add the wonderful google translator to your website.

<!DOCTYPE html>
<html lang="en-US">
<body>


<!-- Copy from here and paste where you want it to appear -->
<div id="google_translate_element"></div>

<script type="text/javascript">
function googleTranslateElementInit() {
  new google.translate.TranslateElement({pageLanguage: 'en', layout: google.translate.TranslateElement.InlineLayout.SIMPLE}, 'google_translate_element');
}
</script>

<script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
<!-- End of code -->

<p>This example displays a simple translate button, with no text.</p>

</body>
</html>


Your reaction?

0
LOL
0
LOVED
0
PURE
0
AW
0
FUNNY
0
BAD!
0
EEW
0
OMG!
0
ANGRY
0 Comments