开发者

Allow to enter language specific character from keyboard

开发者 https://www.devze.com 2023-03-18 04:11 出处:网络
I have one application providing language selection option to user. I want to implement facility that user are allowed to entering text from keyboard in selected language. e.g. If i select Hindi my a

I have one application providing language selection option to user.

I want to implement facility that user are allowed to entering text from keyboard in selected language. e.g. If i select Hindi my application takes an input in Hindi.

I am using JSF(iceface开发者_开发问答s) and Hibernate.

Is it possible ? How ?


use language translation javascript function on onkeyup event

you need to include external JS for this as http://www.google.com/jsapi..

please refer this for your reference

http://www.labnol.org/internet/website-translation-with-google-language-api/4367/

may this help u :)


Everything is possible. The question is "how much is this?"

Go to translate.google.com and see that they are able to detect writing language automatically. if you are able to do so send the text typed by user using AJAX to server and validate that the text is written in chosen language.

But language detection is not so simple task. It is simple if language uses its unique script. For example Georgian language (as far as I know) uses its own script and no other languages use the same script. You cannot say the same about European languages: they all use Latin letters. In this case more sophisticated methods are required and google does it. BTW You can probably utilize this tranlate.google facility (if they have API). Send typed text to google using AJAX and see which language does it detect. It is not 100% correct but much better that everyone of us can implement himself.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号