如何在C#Winforms中翻译文本 [英] How To translate text in C# winforms
问题描述
我需要翻译一些文字&我正在尝试使用Google翻译器进行翻译.我检查了此文章.但是我在以下代码中遇到了异常.
I need to translate some text & i am trying to use google translator to translate it. I checked this article. But i am getting an exception in following code.
result = webClient.DownloadString(url);
异常:远程服务器返回错误:(414)请求URI太大.
我从没使用过API,因此试图使用此类来翻译文本.
I have never Used APIs so was trying to use this class to translate the text.
有什么建议吗?
我检查了类似的帖子,但是找不到更简单的方法.
I have checked the similar posts but could not find simpler way to do that.
推荐答案
您可以为此使用一些SDK.
You can use some SDKs for that.
http://code.google.com/p/google-api-for-dotnet/(非官方的Google Translate API-似乎很旧)
http://code.google.com/p/google-api-for-dotnet/ (Unofficial Google Translate API - Seem old)
http://www.microsofttranslator.com/dev/(Microsoft Translator API-商业)
http://www.microsofttranslator.com/dev/ (Microsoft Translator API - Commercial)
http://msdn.microsoft.com/en-us/library/ff512419.aspx (Microsoft翻译API指南)
http://msdn.microsoft.com/en-us/library/ff512419.aspx (Microsoft Translator API guide)
您可以下载源代码并阅读它们
You can download the source codes and read them
这篇关于如何在C#Winforms中翻译文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!