I basically want to know what the system’s input language is currently on (for users who have multiple language input methods set up). This will determine whether if the text-direction of a <textarea> should be rtl or not.
Please keep in mind that this setting can change after the page is loaded.
Is there a simple way of doing it in JavaScript/jQuery?
There is no way for the browser to tell what the current keyboard layout (input language) is. As @kirilloid mentioned, one possible workaround is to check the
keycodeonkeyupand determine the language from that.