altynbek07 / yii2-qazaq-transliterator
Transliteration Kazakh symbols on the new
Installs: 61
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 0
Open Issues: 0
Type:yii2-extension
Requires
Requires (Dev)
- phpunit/phpunit: ^5.4
README
Yii2 qazaq transliterator behavior
Installation
Composer
The preferred way to install this extension is through Composer.
Either run composer require altynbek07/yii2-qazaq-transliterator:^0.2
or add "altynbek07/yii2-qazaq-transliterator": "^0.2"
to the require section of your composer.json
Using
Attach the behavior in your model:
public function behaviors() { return [ 'transliterate' => [ 'class' => 'altynbek07\yii2QazaqTransliterator\QazaqTransliteratorBehavior', 'attributes' => 'name', ] ]; }
Transliteration multiple attributes:
public function behaviors() { return [ 'transliterate' => [ ... 'attributes' => ['name', 'text'], ... ] ]; }
If you have multilanguage model, you can add this attributes:
public function behaviors() { return [ 'transliterate' => [ ... 'isTranslationModel' => true, 'languageColumnName' => 'lang', // Name of language column in model table 'languageColumnValue' => 'qq-KZ', // Value from new qazaq language column in model table ... ] ]; }
Author
Altynbek Kazezov, e-mail: altinbek__97@mail.ru