How to Identify the website's content language
- by Ajay
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();