How to add Google Translate to a website?


Step 1: Copy the below google transliterate script into your header.html/any UI file.

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

<script type="text/javascript" src=""></script>

Step 2 : The website will be displayed as below. Now you can select any language whichever you want and check.

Thanks for visiting our website

Leave a Reply