1
0
Fork 0

updated pear LangDetect to version 1.0.0

This commit is contained in:
Tobias Diekershoff 2017-09-04 09:52:14 +02:00
commit c86840c4b9
17 changed files with 1407 additions and 270 deletions

View file

@ -0,0 +1,15 @@
<?php
/**
* How to handle errors
*/
require_once 'Text/LanguageDetect.php';
require_once 'Text/LanguageDetect/Exception.php';
try {
$ld = new Text_LanguageDetect();
$lang = $ld->detectSimple('Das ist ein kleiner Text');
echo "Language is: $lang\n";
} catch (Text_LanguageDetect_Exception $e) {
echo 'An error occured! Message: ' . $e . "\n";
}
?>