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 s开发者_JAVA百科mall (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#.
I don't speak C#, but my guess is you are using GET as the method to transport the text. GET parameters have a limited maximum size (usually around 1 or 2 kilobytes). I think you need to use POST.
精彩评论