mirror of
https://github.com/friendica/friendica
synced 2025-04-24 07:10:11 +00:00
Revert "Update languagedetect library"
This commit is contained in:
parent
c22920edba
commit
071946fa78
101 changed files with 3632 additions and 311 deletions
15
library/langdet/docs/errorhandling.php
Normal file
15
library/langdet/docs/errorhandling.php
Normal 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";
|
||||
}
|
||||
?>
|
Loading…
Add table
Add a link
Reference in a new issue