Skip to content

Instantly share code, notes, and snippets.

@joshuaaguilar20
Last active March 17, 2020 23:59
Show Gist options
  • Save joshuaaguilar20/f6054aa3e9e9ca48a91efff6b66e3848 to your computer and use it in GitHub Desktop.
Save joshuaaguilar20/f6054aa3e9e9ca48a91efff6b66e3848 to your computer and use it in GitHub Desktop.
google translate api
<!DOCTYPE html>
<html lang="en-US">
<body>
<h1>Joshuas web translator</h1>
<p>Hello DEF NOT HELLO WORLD</p>
<p>Translate this page:</p>
<div id="google_translate_element"></div>
<script type="text/javascript">
function googleTranslateElementInit() {
new google.translate.TranslateElement({pageLanguage: 'en'}, 'google_translate_element');
}
</script>
<script type="text/javascript" src="http://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
<p>You can translate the content of this page by selecting a language in the select box.</p>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment