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 keycode
on keyup
and determine the language from that.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With