0

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

Saubhagya
  • 1,075
  • 1
  • 9
  • 12

1 Answers1

3

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
  • 442,112
  • 142
  • 972
  • 1,088