Created
September 10, 2020 11:55
-
-
Save paulozullu/77ad8ae6d24998981d8c1458609d96a7 to your computer and use it in GitHub Desktop.
Google translate
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en-US"> | |
<head> | |
<title> | |
How To Add Google Translate | |
Button On Your Webpage ? | |
</title> | |
</head> | |
<body> | |
<p>Hello everyone!</p> | |
<p>Welcome to GeeksforGeeks</p> | |
<p> | |
Translate this page in | |
your preferred language: | |
</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= | |
"https://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