谷歌翻译API有时不响应
我正在使用 PHP。
谢谢
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您使用 GET,您的 URL 限制为 2k 个字符,这会提供(至少对我而言)360 个字母的编码文本。如果您使用 POST,您(应该)有 5k 个字母。
如果您超过限制,那么 google 的行为正如您所描述的那样。
我有 发布了 GET 版本的一些 JavaScript 代码。
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.