How to enable multiple languages on the Knorish website using Google Translate?

Created by Rishabh Pandey, Modified on Fri, 27 Sep at 3:07 PM by Prerak Jain

Easily enable multiple languages on your Knorish website by integrating Google Translation. This feature allows visitors to select their preferred language, and Google Translate will automatically convert the page for them.


TABLE OF CONTENTS


What will be displayed on your website once the integration is complete?

Here's how the Google Translate feature will be displayed on your webpage:



Depending on the version of the page builder you are using, you may need to follow these steps to activate Google Translate on your Knorish website.


Codes for implementation

You need to use below sample code to implement Google Translate on your knorish website.


Script API


<script type="text/javascript" src="https://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>


JavaScript Code to trigger Google Translate


if(getParameterByName('edit') !== 'true')  {

     function googleTranslateElementInit() {

          new google.translate.TranslateElement({pageLanguage: 'en'}, 'google_translate_element');

     }

}


HTML Code to place it on the UI

<div id="google_translate_element"></div>


Utilizing Google Translate on the v3 page builder version

Follow the instructional video below for a detailed, step-by-step guide on how to utilize Google Translate on your Knorish website.


Utilizing Google Translate on the v2 page builder version

Follow the instructional video below for a detailed, step-by-step guide on how to utilize Google Translate on your Knorish website.


Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article