title: How to determine the language of a website
body: <p>I have a url of a website and need to find out which language the website uses (whether it's spanish, french, italian, etc).</p>
  
  <p>The site's top level domain is <em>.com</em>, and this doesn't help at all. I cannot simply check if the string contains '.de', '.fr', or any other country codes.</p>
  
  <p>I was trying to get the <code>lang</code> attribute of the <code>html</code> tag, but there are many websites that don't have it. Also I found <a href="https://stackoverflow.com/questions/28058638/get-language-of-a-website-using-simple-html-dom">here</a> that I can check the meta tag, which would look like this:</p>
  
  <pre><code>&lt;meta name="language" content="english"&gt;
  </code></pre>
  
  <p>But again, not all websites use this tag.</p>
  
  <p>Do you know any other ways to determine a website's language?</p>
  
  <p>Thanks.</p>