Google翻译API [英] Google Translate API

查看:780
本文介绍了Google翻译API的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

0个否决之星


我正在使用Google翻译API在C#程序中将简体中文翻译成英文.问题是,如果文本较小(大约一行),则API可以翻译该文本,但是如果文本较大(超过3行),则会出现异常,指出远程服务器返回了意外的响应:(414)请求URI太大.".但是,如果我在浏览器中使用translate.google.com可以正常工作.

请告诉我如何在用C#编写的桌面应用程序中使用Google Translate API处理大型文档.

0 vote down star


I''m using Google Translation API to translate text from Chinese Simplified to English in my C# program. The problem is if the text is small (around one line) the API is able to translate it, but if the text is larger (more than 3 lines) is gives an exception saying "The remote server returned an unexpected response: (414) Request-URI Too Large.". However if I use translate.google.com in my browser that works fine.

Please tell me how can I process large documents using Google Translate API in my desktop application written in C#.

推荐答案

请考虑传递此类内容一次一句话.还可以考虑一些东东,例如阅读他们的文档,并在专门针对他们的论坛上寻求有关使用其API的帮助.
Consider things like passing it one sentence at a time. Also consider dong things like reading their documentation, and asking for help on using their APIs on the forums dedicated to them.


这篇关于Google翻译API的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆