开发者

How to detect language in an HTML form

开发者 https://www.devze.com 2023-02-16 22:50 出处:网络
I\'ve got a forum where I\'d like to allow only English. Can this be accomplished? How could I detect and block posts by lan开发者_Python百科guage?

I've got a forum where I'd like to allow only English. Can this be accomplished? How could I detect and block posts by lan开发者_Python百科guage?

Thanks.


IMO this is a complete waste of time. Let the forum community regulate it.

But if you're still wanting to go ahead, you could use the Google Translate API. http://code.google.com/apis/language/translate/v1/getting_started.html#usingDetect


It is hard, but possible. Here is an example using PHP:

http://phpir.com/language-detection-with-n-grams

0

精彩评论

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