1. Go to this page and download the library: Download siugnur/whatlang-php library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
siugnur / whatlang-php example snippets
use Whatlang\Detector;
use Whatlang\Lang;
use Whatlang\Script;
$detector = Detector::new();
$info = $detector->detect("Hello World");
echo $info->lang(); // Lang::Eng
echo $info->script(); // Script::Latin
echo $info->confidence(); // 1.0
echo $info->isReliable(); // true