I want to translate a string using Google Translator with HtmlAgilityPack; .
I want to use HTML Agility Pack to parse HTML documents.
I tried this:
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);
}
}
But I get no results.
My aim is to translate a complete string using Google Translate and to show the translated string in a label in Windows Forms.
How can I do this?