Translation not showing in popup window
Quickly OCR part of the screen and save resulting text to clipboard
Brought to you by:
cb4960
Hello.
Using Capture2Text 4.6.0 (error happened with 4.5.1 the first time, didn't get solved by upgrading versions) on Windows 10 Pro (Build 17134) 64 bit.
All of a sudden the translation stopped showing up in the popup window (Translating from Japanese to English), regardless of the setting in the Translate panel "Show translation in popup window". Unfortunately, this tool loses its purpose for me if it doesn't translate. So, any way to see what the error is in this case? I don't see any logs, only the ini file.
I've read that for the translation to work I need an active internet connection. I definitely have and had one at the time the error occured.
I'd appreciate any kind of help. Thank you.
Update (30 minutes later): it started showing the translation again but I didn't change anything in the settings. Could it be that it sometimes can't reach Google Translate?
When the error occured, I immediately checked GT (to translate the text that capture2text couldn't translate) and it worked. So I'm not sure if that could really be an error cause.
In what cases could capture2text fail to show the translations despite it being set in the settings? If it could be a timeout of a request to an external service like GT, maybe it should be logged somewhere so the user (and the developer) know what's going on.
Update 2 (another 15 minutes later): the translation stopped showing up again with no settings changed. Just from one capture to the next it disappeared and didn't show up again ever since...
Last edit: Christopher Wardle 2018-07-20
I am having the same problem, it was working just fine yesterday, and today the translation box stopped showing up all of a sudden, I didnt change any settings whatsoever. I think it could be the program fails to make a connection to Google Translate. Please look into it. Thank You.
I highly suspect that Google Translate starts blocking your IP after too many requests in a set period of time. Every time Capture2Text stopped showing me the translation, I switched to a new VPN connection giving me a new external IP (I used Tunnelbear but any VPN client will do) and it started working again immediately after. It usually stopped working again after half an hour or so of constant translation requests to the Google Translate server but after another VPN switch it worked again.
Pretty sure you could see it if you monitor your network traffic with something like Wireshark and it should show something like an error or timeout response from Google Translate but Capture2Text doesn't show it to the user nor does it log such events. Haven't had the time to try this though, maybe someone else can say more on this.
tl;dr: switching the external IP (e.g. different VPN connection) circumvents the block from Google Translate which I suspect is the culprit for no translation window showing in the popup window of Capture2Text.
As a suggestion I'd definitely like to see a log file in a future release of Capture2Text. At least for any errors and timeouts from external services.
Last edit: Christopher Wardle 2018-07-22
Google translate api lately are going overboard with blocking algorithm.
Switch to headless browser on google translate page as a backup may help.
A little bit slow though.
I have analyzed the problem, It's a anti-bot of the google.
To solve this issue you can simulate a request from the google translator webpage.
The google translator send to the a api a token genareted based on a random value and a checksum of the target text to translate.
I have update my translation library that can translate without limitation, you can found here:
https://github.com/marcussacana/TLIB/blob/master/Google.cs
You can port my code or just use the DLLExport and implement the dll to the program.
This part of the code I haven't found a case that he is executed so I don't tested yet.

As a extra a sample/temporary replacement of the automatic translation
https://megaupload.nz/56j7Kbfabc/Debug.rar
Last edit: Marcus 2018-08-10
Thank you so much. I have never used DLLExport before, I am not really good at computer and coding and stuff. But I will try. Thank you.
I am sorry to bother you like this but how do i make a dll file. I tried to copy the code and paste it into a .txt then change the .txt into .dll but it does not work.
If you just want use the Caputure2Text auto-translation you can use the too inside the last link in my post above
Oh, thats right, I forgot that you include a translation tool.
Last edit: Erik Barone 2018-08-18
Hey, Marcuss.
After a while, this printing program stopped working.
Would there be a way for me to translate Capture2Text without interruptions?
Maybe the google updated the checksum, I not confirmed, but here, the current google code:
https://pastebin.com/9iKXyjwx
What line you tried translate? Maybe this line used the part 'untested' of my code.
Last edit: Marcus 2018-09-22
In fact I would like to take a step like rs
Marcus, could you help me?
Basically, this method is patched by the google too.
Sorry but the google patched too fast, I published the code with the new method in august don't have 2 months and is already patched.
I will stop support the library now or the google can do something to me.
Looks the google is mad with my library, and no one wants see the google mad.
Last edit: Marcus 2018-09-28
Got it.
But would there be no other way?
For even ClipTrans stopped working.
Would you know another way to get ClipTrans to work?
Well, if you really want... download the lastest release and extract in the .zip the TLIB.dll to the 'ClipTrans' directory and he will works again, but isn't unlimited! and if you exceed the limit you will recive ban ip from the google
https://github.com/marcussacana/VNXTLP/releases
This build of the link above is using the lastest version of my TLIB, continues working for now... but I don't have plans to fix it again once the google patched it again..
Last edit: Marcus 2018-09-29
I copy the file "TLIB.dll" which is in the "BASE" folder to the folder where the ClipTrans application is, right?
Yep...
Unfortunately it did not work.
Many thanks, Marcus.
It's possible to get your own Google Translate API key to avoid the lockout/timeout. Pricing is very reasonable and prorated at 20$ per million characters. ie. I can't image it would cost more than a couple bucks a month for personal use using your own API key.
can u advise how to do it - > caonnect to my google API?
Hi,
Is there any update with this issue?
私も同じ問題に悩まされましたが、解決しました。私は日本人です。
Append translation to clipboard のチェックを外すことで直りました。