Hello friends, this is a very quick tutorial which will demonstrate how to use google translate button on your website. If your website have visitors from all over the world and you want to add an option to for your site visitors to view your website in his local languages, then you have an option to use the Google Translate with your website.
Want to add Google Translate button to your website, then keep your close attention in this post. I will explain the simple and easy steps with the demo to add google translate on your site.
Copy and paste below code in your web page where you want to display the Google translate button.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
< !DOCTYPE html> <html lang="en-US"> <body> <h1>My Web Page</h1> <p>Hello everybody!</p> <p>Translate this webpage:</p> <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> <br /><br /> <p>Translate the content of this page by selecting a language from the above drop down.</p> </body> </html> |
If you like FreeWebMentor and you would like to contribute, you can write an article and mail your article to [email protected] Your article will appear on the FreeWebMentor main page and help other developers.
Article Tags: google malayalam translation, google translate, google translate english to hindi, google translate hindi to english, google translate in hindi, google translater, google translation, google translator, spanish to english translation google translator