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?

Hi,

You cannot use google translate without google "approvel".
You need to open an account and then use their API.

You can find more information here:
https://developers.google.com/translate/

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.