How to translate text in winforms c #

I need to translate some text, and I'm trying to use a Google translator to translate it. I checked this article. But I get an exception in the following code.

result = webClient.DownloadString(url); 

Exception: the remote server returned an error: (414) Request-URI Too Large.

I never used an API, so I tried to use this class to translate text.

Any suggestions?

I checked similar entries, but could not find an easier way to do this.

+4
source share
2 answers

You can use some SDKs for this.

http://code.google.com/p/google-api-for-dotnet/ (Unofficial Google Translate API - seems old)

http://www.microsofttranslator.com/dev/ (Microsoft Translator API - commercial)

http://msdn.microsoft.com/en-us/library/ff512419.aspx (Microsoft Translator API Guide)

You can download the source codes and read them.

+2
source

If you use Winforms, Microsoft Translator is also a good option, they are provided as web services that are very easy to use .net.

Documentation:

+2
source

Source: https://habr.com/ru/post/1382649/


All Articles