I have read posts on this forum where some have had the Google API block their IP after a certain number of hits, although I don't know the particulars of the algorithm that does that. It seems to vary between users.
I have not had that issue. My wife is a teacher who occasionally has bilingual students with non-English speaking parents. She puts out a weekly newsletter (created in MS Publisher) that then must be translated for them. It's usually a couple of pages with a couple dozen paragraphs.
Using @teadrinker's phenomenal function (thank you @teadrinker!), I wrote a script to do an in-place translation for her. After creating the English version and saving it, she goes back through to translate it. Highlighting a paragraph or section, she presses a hotkey (^t in this case) and the script copies the highlighted text to the clipboard. It then pumps it through the translator, putting the translated text back into the clipboard. Since the text in the document is still highlighted, the script simply needs to send a ^v to paste it, which replaces the highlighted text. Simply put: highlight, ^t, done. In over two years of using it, she has never mentioned a problem.
Unfortunately, your mileage may vary and I don't have a definitive answer for you.
Russ
Using Google Translate to automate text translation
Re: Using Google Translate to automate text translation
I use my version (discussed here)
viewtopic.php?f=6&t=63835&start=160#p442360
for the same purpose. I'm not a teacher, but a school psychologist in a public school district. I got the idea from an app called 'Translator Boomerang' that was made by Mouser over at Donation Coder a long time ago. It was actually made as a novelty "toy" rather than a utility. It translated some text from English, to another language, then took the result and translated it back to English. I immediately saw the potential to use it as a tool to error-check translations. Basically, if the message gets lost in translation, then I re-word it and try again.
Mouser's tool also utilized Google translate, but it stopped working years ago. So when I saw Teadrinker's function a long time ago I remade the boomerang effect. Teadrinker helped me setup my adaptation. (Thanks Teadrinker! ) My setup uses a MsgBox to preview the versions of the prose though, so if you used it for multiple pages of text, it probably wouldn't fit on the MsgBox.
For what it's worth, I've never had problems with Google blocking me, but I only ever use it for a small number of translations.
ste(phen|ve) kunkel
-
- Posts: 4391
- Joined: 29 Mar 2015, 09:41
- Contact:
Re: Using Google Translate to automate text translation
Guys, it's really nice to know that my script is being put to good use! I'm going to keep it up.
Re: Using Google Translate to automate text translation
That's because your code rocks, @teadrinker!
We're not worthy!
We're not worthy!
Russ
We're not worthy!
We're not worthy!
Russ
Re: Using Google Translate to automate text translation
Thank you Teadrinker! It's a real life saver for live communications.
Do you know if the fetched package contains the detected source language (when it is set to automatic)?
Do you know if the fetched package contains the detected source language (when it is set to automatic)?
-
- Posts: 4391
- Joined: 29 Mar 2015, 09:41
- Contact:
-
- Posts: 4391
- Joined: 29 Mar 2015, 09:41
- Contact:
Re: Using Google Translate to automate text translation
You didn't miss it, I have someone reviewing my baby posts.
I realized that I can just use this without any changes to your script!
I realized that I can just use this without any changes to your script!
Code: Select all
Locale := "auto"
GoogleTranslate(A_Clipboard, &Locale)
Re: Using Google Translate to automate text translation
Thank you very much for this @teadrinker ! I'm going to give it a try shortly!