title: how to detect user's language while he/she is typing
body: <p>guys i have a problem with this thing , i must know which language the user is using while typing in an input text to handle some bad shaped things and i even looked at <a href="https://stackoverflow.com/questions/18557494/how-to-detect-users-language">this in here</a> but it didn't helped me , can u guys help me with the right code ?<br>
  the languages i must know are english and persian :| thanks :) 
  <code>i need some javascript helps</code>  </p>
  
  <pre><code>&lt;input type="text" id="give_me_the_lang"&gt;
  &lt;div id="show_lang_in_here"&gt;&lt;/div&gt;
  </code></pre>