inblank/yii2-transliter
Composer 安装命令:
composer require inblank/yii2-transliter
包简介
Yii2 transliterator
README 文档
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);
统计信息
- 总下载量: 24.01k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 1
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-05-18