inblank / yii2-transliter
Yii2 transliterator
Installs: 20 945
Dependents: 1
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
Type:yii2-extension
Requires
- yiisoft/yii2: ~2.0.0
Requires (Dev)
- codeception/codeception: ^2.1
- codeception/specify: ~0.4
- codeception/verify: ~0.3
- yiisoft/yii2-codeception: ~2.0
This package is not auto-updated.
Last update: 2024-11-09 18:06:34 UTC
README
Русская версия доступна здесь.
This transliteration component is used mainly for the transliteration of strings in the Russian language by the rules which are well understood Yandex, and used to improve SEO.
Installation
The preferred way to install this extension is through composer.
Navigate to the project folder and run the console command:
$ composer require inblank/yii2-transliter
or add:
"inblank/yii2-transliter": "~0.1"
to the require
section of your composer.json
file.
Configuring
In the application configuration file in section components
add the lines:
'transliter' => [ 'class' => 'inblank\transliter\Transliter', ],
As with all components in Yii2 you can set your parameters for the class.
Usage
To transliterate of the string simple run:
$result = Yii::$app->transliter->translate($str);