Ali
Ali

Reputation: 1841

Google translation API not responding sometimes

I am using http://ajax.googleapis.com/ajax/services/language/translate to translate pages on the fly. Sometimes it happens that I get no response from Google and my page displays blank. Is it possible that their service sometimes doesn't respond in timely fashion? Is there a way to overcome it like when I get no response from Google?

I am using PHP.

Thanks

Upvotes: 1

Views: 1149

Answers (1)

pkario
pkario

Reputation: 2220

If you are using GET your URL is limited to 2k characters, that gives (at least for me) 360 letters of encoded text. If you are using POST you (should) have 5k letters.
If you go over the limit then google's behaviour is as you describe it.
I have posted some javascript code for the GET version.

Upvotes: 2

Related Questions