开发者

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


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜