Language Detection Library for PHP


In a linguistic diversity on the internet report published by UNESCO in 2009 it is noticed a steady year-on-year decline in the percentage of webpages in English from 75% in 1998 to 45% in 2005. indicates today that there are 171 languages used on the web, 52% for English, 133 are used by less than 0.1% of the websites. However the distribution of language spoken in the world is completely different since English speakers represent only 5% !

Finding new businesses, new customers, new leads, require necessarily speaking new languages, or at least understanding the language that others are using. That’s why a library for language detection is very important, and could open doors to bunch of new opportunities. A great implementation of a language detection algorithm in PHP is available today, and comes with text samples used for training and detecting text in 106 languages.

A basic usage of the library :

Result will be :

The library is trainable which means you can change, remove and add your own language files to it. If your language not supported, feel free to add your own language files.

More information and download on the github repository, released under an MIT license.


Please enter your comment!
Please enter your name here