开发者

How to detect language in an HTML form

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜