title: detect user input language javascript
body: <p>Is there a way to detect in which language user is typing in input/textarea field? 
  I have seen such on facebook, If user starts typing in RTL language then cursor move on right side of input box.
  I tried to find but coould not see any idea, Thanks for any help</p>