When I install the Google Translate app nothing happens. I’m really at a loss about what to do. Does it only appear on non-English machines? I tried changing the system language to German and it made no difference. Would greatly appreciate any insights.
How did you installed it?
What Web browser have you used to test it and what language(s) have you got installed for your Web browser and which for the content/Websites?
You can also check it by HTTP headers your Web browser sends when you visit an Website … or try to opening this URL article and see if you got an upper “translate bar”?
Test article URL:
- Zastarjeli zakon o zaštiti autorskih prava na YouTube platformi omogućava brojne zloupotrebe – Racunalo.com
Moreover, what is your OS language?
Implementation that works on the above article URL:
Working on this. Grateful to discover the community is so responsive. And thank you especially for the script. I will report back as soon as I resolve this. My initial attempt was merely to install the app and specify a location for the drop down box. It seemed all very straightforward and appeared to work normally, but then I could not get the box to appear in Chrome.
Thanks again for your response. Normally I would dig longer and harder, but I am a little buried right now because of the CDN switch and my initial take on further researching this is that everyone’s opinion is different.
If it’s not leaning too much, I very much would like the translations to happen more or less automatically (no button or dropdown window) and exactly like the website you referenced. Some people might think this intrusive from an interface perspective, but it is easy enough given how the site you reference is working for the user to decline the translation. And I am not sure in general if (1) all users are willing to take the trouble to request a translation if the browser does not do it automatically and (2) if some of them even know translations are readily available.
So I have a few questions.
QUESTION ONE: WHERE TO PUT STUFF
I’m not sure where to put things. Your code appears to have three elements: the
I am running a WordPress site. I’ve loaded SCRIPT ONE into a custom JS page, but I am not sure where to load the others.
My Custom HTML page (from a plugin) says:
So I am guessing that is where I load the DIV TAG and I THINK also SCRIPT TWO
The example at https://www.w3schools.com/howto/howto_google_translate.asp shows it all on a single webpage. This is really confusing for me
My Web Page
Translate this page:
QUESTION TWO: SIMPLE LAYOUT NOT MOBILE-FRIENDLY?
I also wanted to note that at least one writer suggests that " layout: google.translate.TranslateElement.InlineLayout.SIMPLE, " is not mobile-friendly, but until I get this up and running I cannot know what the consequences are of removing this line of code.
At https://www.w3schools.com/howto/howto_google_translate.asp and many other examples, "includedLanguages: ‘bg,bs,de,es,fr,hr,hu,it,ja,ko,mk,nl,ro,ru,sl,sq,sr,zh-CN’, " is omitted.
Is this line intended to limit what languages are translated? And if it is omitted entirely, can I assume that is the same as including a list of all available Google translations? I ask because I have already started searching for a complete list of the language codes Google translates. I see no reason for limiting the possibilities.
All the code disappeared. My mistake I am sure.
Some usefull links:
Put this code below inside
<body> ... </body> where you want the Google Translate box to appear.
Put this inside
<head> ... </head>.
Works fine for me at 320px and 360px or wider as the screenshot below:
That are the alternative languages which can be selected/choosen from the dropdown list.
It can be up to 64 languages as far as I know.
Just to note here:
This Google Translate box with the code from above is working with an Cloudflare
Rocket Loader being enabled too at my Website. No issues.
For that one, I guess you would need Google Translate API and pay for the language per character or a word using the Google Cloud setup at your Website.
And just to note, thinking if a bot would crawl your Website, and you would implement automatic translate to detect per user/IP address/Web browser language/OS language?
I guess that would also count as “translate”, so watch out to not get cought by having more costs and higer bill at the end of the month.
An example of a tricky “automatic translation” for your user/visitor:
- I can be from Croatia
- Having English Windows OS
- While using FireFox with Croatian language as default
- And also being at the moment in Austria or China
- Not to mention, what about VPN? (my IP would show other country too if using a VPN)
Question: What language would you serve to me?
From my point, a better approach would be to give a user/visitor an option to select his language which he understands (different language) using a GTranslate box for the contant written in an original language for your Website
You are very generous, Sir, and I thank you for your time.
I am happy to assist you