Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Make Google Translator Widget Language Labels in English rather than user's browser language

I am using a google translator widget on my website. Script below.

function googleTranslateElementInit() { new google.translate.TranslateElement({pageLanguage: 'en', layout: google.translate.TranslateElement.InlineLayout.SIMPLE, autoDisplay: false}, 'google_translate_element'); }

The translation widget comes up and language switching works fine.
But the problem is that the text in google widget drop-down is getting loaded in the browser language.
For example, if I open the website from Netherlands/Dutch, it will show Engels instead of English
What I need is to display the widget text always in English.
I did try adding the Pagelaguage as 'en' but didn't work.
Need help to solve this.
0 0 566
0 REPLIES 0