1. Go to this page and download the library: Download mekras/php-speller 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/ */
use Mekras\Speller\Aspell\Aspell;
$speller = new Aspell();
use Mekras\Speller\Aspell\Aspell;
$speller = new Aspell('/usr/local/bin/aspell');
$aspell = new Aspell();
$aspell->setPersonalDictionary(new Dictionary('/path/to/custom.pws'));
use Mekras\Speller\Hunspell\Hunspell;
$speller = new Hunspell();
use Mekras\Speller\Hunspell\Hunspell;
$speller = new Hunspell('/usr/local/bin/hunspell');
use Mekras\Speller\Hunspell\Hunspell;
$speller = new Hunspell();
$speller->setDictionaryPath('/var/spelling/custom');
use Mekras\Speller\Hunspell\Hunspell;
$speller = new Hunspell();
$speller->setDictionaryPath('/my_app/spelling');
$speller->setCustomDictionaries(['tech', 'titles']);
use Mekras\Speller\Ispell\Ispell;
$speller = new Ispell();
use Mekras\Speller\Ispell\Ispell;
$speller = new Ispell('/usr/local/bin/ispell');
use Mekras\Speller\Source\FileSource;
$source = new FileSource('/path/to/file.txt');
use Mekras\Speller\Source\FileSource;
$source = new FileSource('/path/to/file.txt', 'windows-1251');
use Mekras\Speller\Source\StringSource;
$source = new StringSource('foo', 'koi8-r');
use Mekras\Speller\Source\HtmlSource;
$source = new HtmlSource(
new StringSource('<a href="#" title="Foo">Bar</a> Baz')
);
echo $source->getAsString(); // Foo Bar Baz
use Mekras\Speller\Source\IconvSource;
use Mekras\Speller\Source\StringSource;
// Convert file contents from windows-1251 to koi8-r.
$source = new IconvSource(
new FileSource('/path/to/file.txt', 'windows-1251'),
'koi8-r'
);
use Mekras\Speller\Source\XliffSource;
$source = new XliffSource(__DIR__ . '/fixtures/test.xliff');
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.