views:

376

answers:

1

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#.

+3  A: 

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.

Pekka
This is right. See http://code.google.com/apis/ajaxlanguage/documentation/#fonje .
Matthew Flaschen
Thanks buddy, that was a really helpful information.
Saubhagya