In Google Website translator while onloading get default language then the chosen language is loading

387 views Asked by At

In Google Website translator while onloading get default language then the choosen language is loading

As My client requirement I need to change the content of the chosen language but it loading as default language and after loaded it changing to chosen language

How to avoid these kind of scenario on my site

1

There are 1 answers

0
Chris Rutherfurd On

The Google Translate API uses an AJAX connection, so the content is downloaded from the server to the browser in the default language and only once the content has been loaded can it be changed to the chosen language. The only way to avoid this would be to hide the content using display: hidden; until the element has been translated by Google Translator and then remove the display: hidden; style to display the translated content.