toreachdeepak Posted July 28, 2012 Share Posted July 28, 2012 Hi, I want to feature to enter english and other languages in my website input box. I mean where I enter the text, I can choose the language to enter. Regards Deepak Bhatia 1 Link to comment Share on other sites More sharing options...
boen_robot Posted July 28, 2012 Share Posted July 28, 2012 "Language" as in "keyboard layout" or "spell check"?If you're talking about keyboard layout... You can't really do that. That's up to the user's keyboard settings. The closest thing to that you can do is detect the key pressed, and emulate a different keyboard layout based on a user selection. Depending on the browser used, this could backfire (=> the user would enter the character configured at their keyboard settings). You can do that using JavaScript. Attach an "onkeydown" event, check the pressed key from the event's "keyCode" property, append the character that corresponds to it (NOT the "charCode" character - this is the character based on the user's current keyboard settings), and return false to prevent the original character from being written. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now