0

I have a pair of <input type="text">, each of them should contain only words from a specific language (in my case, first should have only cyrrilic letters, and the second - only latin).

I'm wondering, is there some way, using HTML, or JavaScript to automatically change my language in Windows when I set focus to these fields?

I presume, you could write a script that could automatically decode one alphabet to other? Like, for example I type into the field russian word "сфк" (which is equivalent to "car" in the other language), so I could try and set specific letters to be translated into others? So I'll have to have an array of different letters, that would be translated into? As in..

"с"(russian) -> "с"(english)  
"ф"(russian) -> "a"(english)  
"к"(russian) -> "r"(english)

Thank you!

Arno
  • 356
  • 5
  • 18
  • 1
    this is pretty simple substitution (e.g. use Jquery `$.change()` to hookup to the input and then just do a string replace on the contents). Whether this is something you really want to do is another story - the user would think that they know they haven't changed the input language but it changed for them. – zaitsman Jul 09 '14 at 11:54
  • 2
    Not to mention that you can not simply replace characters to change one word from russian into english or any language for that matter. – putvande Jul 09 '14 at 12:03

0 Answers0