Google Translate is a free multilingual machine translation service developed by Google, to translate text. It offers a website interface, mobile apps for Android and iOS, and an API that helps developers build browser extensions and software applications. Google Translate supports over 100 languages at various levels and as of May 2017, serves over 500 million people daily. this is how we can adding google translate to website
Create div
<div id="google_translate_element"></div>
Create java script
Include google translate and create function to translate from en(English) into the language chosen in the div
<script type="text/javascript">
function googleTranslateElementInit() {
new google.translate.TranslateElement({pageLanguage: 'en'}, 'google_translate_element');
}
</script>
<script type="text/javascript"src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit">
</script>
https://sayapusing.com/2019/05/07/adding-google-translate-in-website-2/
Comments
Post a Comment