How to Identify the website's content language

Posted by Ajay on Stack Overflow See other posts from Stack Overflow or by Ajay
Published on 2010-06-02T11:38:28Z Indexed on 2010/06/02 11:44 UTC
Read the original article Hit count: 204

Filed under:
|
|
|
|

I am developing a website to crawl the other website content in ASP.NET . I am able to get the content correctly but how can I identify which language is used based on that content.

I used following code.

HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(TextBox1.Text ); request.UserAgent = "A .NET Web Crawler";

    WebResponse response = request.GetResponse();

    Stream stream = response.GetResponseStream();

    StreamReader reader = new StreamReader(stream);
    string htmlText = reader.ReadToEnd();

© Stack Overflow or respective owner

Related posts about c#

Related posts about ASP.NET