jiangzhendong / google-api-translate-java

Automatically exported from code.google.com/p/google-api-translate-java
0 stars 0 forks source link

No translation result returned. #21

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Call Translate.translate in a loop. 
2. I created an object of Translate and setUsingRateControl to false
3.

What is the expected output? What do you see instead?
Expected output is translated string but i get exception instead. Below is 
my Exception.
Exception in thread "main" java.lang.Error: No translation result returned.
        at com.google.api.translate.Translate.retrieveTranslation
(Translate.java:135)
        at com.google.api.translate.Translate.translate(Translate.java:107)
        at camel.HelloWorldTranslate.main(HelloWorldTranslate.java:26)
Java Result: 1

What version of the product are you using? On what operating system?
I'm using google-api-translate-java-0.30.jar

Please provide any additional information below.

Original issue reported on code.google.com by almoh...@gmail.com on 19 Apr 2008 at 5:08

GoogleCodeExporter commented 8 years ago
It sounds like you've queried the translate service at too high a rate.
Unfortunately, there's nothing more we can do about this at the moment.

Original comment by rich.mid...@gmail.com on 20 Apr 2008 at 3:06

GoogleCodeExporter commented 8 years ago
Hello Rich,

Thanks for reply. Do you suggest anything? I'm working on this translation for 
an 
application and I have about 1200 files to translate. It is only for demo 
purposes 
to show that the application can be localized. 

Do you have any recommendation for me as to how to go about it without getting 
locked out and if I still get locked out then how do i get unlocked?

Thanks,
Ali.

Original comment by almoh...@gmail.com on 20 Apr 2008 at 3:27

GoogleCodeExporter commented 8 years ago
You'll have to wait from a few days to about a week to get it unlocked, or try 
from a
different IP address.

If you setUsingRateControl to true it will try and prevent you getting locked 
out.
Other than that, try translating long Strings, not just single words or even
sentences so you make fewer calls to the service.

Original comment by rich.mid...@gmail.com on 20 Apr 2008 at 5:58