-
-
Save carolineschnapp/806456 to your computer and use it in GitHub Desktop.
<div id="google_translate_element"></div> | |
<script> | |
function googleTranslateElementInit() { | |
new google.translate.TranslateElement({ | |
pageLanguage: 'en' | |
}, 'google_translate_element'); | |
} | |
</script> | |
<script src="http://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script> |
Yes, it now works for me too. I meant to write back to say it started working the following day. So there must have simply been a tempory issue in July.
It is working for me (I build sites on a 3rd party platform) but the default menu language is coming up in the geographical local language (in this case Thai).
I tried a Google "expert" who insisted that the menu language is decided by your Chrome language settings, but he was full of crap. I have no Thai settings in my browser, or on my laptop at all. It's not even an alternative language choice in Windows or Office for me.
I insist that it's being decided by location but he disagreed.
To check, I set the following code in my website:
.. and it comes up as Thai (as I am in Thailand).
When I was last working in Zambia, it came up in English
To verify, I connected via a VPN to a server in London and, lo and behold, the menu language changed to English! I simultaneously checked the exact same website on my phone (not connected via VPN) and it's still in Thai.
Anyone know how to lock the menu language to English (or another language, come to that)?
Thanks peeps.
sam
I implemeted in reactjs, but I want show loading when api call. how i can implment or how i can get api loading state.
Hello Guys,
i really want a translator that i can customize with the country flag. i have seen some used this google code
<script> function googleTranslateElementInit() { new google.translate.TranslateElement( {pageLanguage: 'en'}, 'google_translate_element' ); } </script> <script src="http://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script> and it was customized.Now i want to use this same code for translation in this my fellow websites Get Backlinks, Plus Naija and Heartlandngr. please who can assist to use country flag in this translator.
Using:
...works just fine for me as of today (setup on a new website).