从PHP中的字符串检测语言

从PHP中的字符串检测语言

问题描述:

在PHP中,有没有一种方法可以检测字符串的语言?假设该字符串为UTF-8格式.

In PHP, is there a way to detect the language of a string? Suppose the string is in UTF-8 format.

您无法从字符类型中检测语言.而且没有万无一失的方法来做到这一点.

You can not detect the language from the character type. And there are no foolproof ways to do this.

通过任何方法,您只是在进行有根据的猜测.有一些与数学相关的

With any method, you're just doing an educated guess. There are available some math related articles out there