mirror of
https://github.com/friendica/friendica
synced 2024-12-26 09:20:17 +00:00
7d876aab98
- Updated mobiledetectlib to 2.8.26 - Updated PEAR to 1.10.5 - Updated Archive_Tar to 1.4.3 - Updated XML_Util to 1.4.3
15 lines
No EOL
365 B
PHP
15 lines
No EOL
365 B
PHP
<?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";
|
|
}
|
|
?>
|