inblank/yii2-transliter

Yii2 transliterator

Installs: 19 403

Dependents: 1

Suggesters: 0

Security: 0

Stars: 1

Watchers: 1

Forks: 0

Open Issues: 0

Type:yii2-extension

0.1.1 2017-07-22 20:59 UTC

This package is not auto-updated.

Last update: 2024-04-13 15:12:13 UTC


README

Build Status Packagist Version Code Coverage Code Quality GitHub license

Русская версия доступна здесь.

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);