I'm working on a site with forms that require a certain language to be used. (Something like a dictionary). I want to know if there is a way in JavaScript/HTML to check the language. For example, if I need the input in Japanese and the user gives me an English word, it is detected as an error.
+3
A:
You could take a look at the Google AJAX Language API and there's an example of language detection.
Darin Dimitrov
2010-05-18 14:13:54
A:
No, there is not a way to do this with straight java/html. The best you could do is hope that UTF-8 is the encoding, and then you check the character class. But that still doesn't really tell you which language is used.
Brent Arias
2010-05-18 14:15:19
Not to be annoying, but Java is not the same as JavaScript. :)
nico
2010-05-18 14:32:52