0

My web app is in English. But i need to load the web app is French in one environment and in Spanish in another environment.

Even though i have added the below code for the first environment, the webapp doesn't load in french

function googleTranslateElementInit() {
   new google.translate.TranslateElement({pageLanguage: 'fr', multilanguagePage: true,
   layout: google.translate.TranslateElement.InlineLayout.HORIZONTAL}, 'google_translate_element');
}

How can we set default language in which the page should be loaded here?

Mohan Rajput
  • 634
  • 9
  • 21
Aditya
  • 1
  • Solution for your query can be find on : https://stackoverflow.com/questions/13030153/translate-website-to-any-specific-language-on-page-load and https://stackoverflow.com/questions/1773687/google-translate-set-default-language/42667484#42667484 – Mohan Rajput Oct 26 '18 at 06:17
  • Thanks @MohanRajput. Is there any other solution that is native to google website translator (like setting a property in initialisation script that i have added above in my question), so that i don't have to add a workaround script – Aditya Oct 26 '18 at 06:42
  • The most probably solution you can achieve is setting default language from : https://support.google.com/translatortoolkit/answer/6306378?hl=en . Hope this will work for you. – Mohan Rajput Oct 26 '18 at 06:57

0 Answers0