Proof-of-concept of using PHP-ML to classify the language strings are written in made as a small project for "Applied Machine Learning"
Article about the small project: https://www.linkedin.com/pulse/language-classification-using-machine-learning-php-daniel-liljeberg
./languageClassification.php "Hello everyone" "Hur mycket är klockan?" "Wie viel kostet dieser Computer?" "El toro" "min computer starter ikke, og det gør mig skør"
Note that the script does not use all available languages. That is overwritten further down the script to speed training up.