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

五迷三道 提交于 2019-12-13 13:09:57

问题


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:


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.



来源:https://stackoverflow.com/questions/20989158/in-google-website-translator-while-onloading-get-default-language-then-the-chose

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!