在C#winform中使用winform中的google translator翻译一些字符串
我想翻译winform应用程序中的字符串。 我想从google translator翻译这篇文章,所以我的方法是使用“HtmlAgilityPack”的抓取html方法。 使用HTMLAgilityPack,我想在我的winform中将翻译后的字符串显示为标签。我在谷歌上搜索了一下,但没有成功。我该怎么做??? 我不想用google tranlator api来代替这个 我想要这个:在C#winform中使用winform中的google translator翻译一些字符串,c#,winforms,html-agility-pack,google-translate,C#,Winforms,Html Agility Pack,Google Translate,我想翻译winform应用程序中的字符串。 我想从google translator翻译这篇文章,所以我的方法是使用“HtmlAgilityPack”的抓取html方法。 使用HTMLAgilityPack,我想在我的winform中将翻译后的字符串显示为标签。我在谷歌上搜索了一下,但没有成功。我该怎么做??? 我不想用google tranlator api来代替这个 我想要这个: using HtmlAgilityPack; ........ var webGet = new HtmlWe
using HtmlAgilityPack;
........
var webGet = new HtmlWeb();
var document = webGet.Load(
"http://translate.google.com/#en/bn/this%20is%20my%20string");
var node = document.DocumentNode.SelectNodes(
"//span[@class='short_text' and @id='result_box']");
if (node != null)
{
foreach (var xx in node)
{
x = xx.InnerText;
MessageBox.Show(x);
}
}
看看如何使用GoogleAPI进行翻译