PHP code example of altynbek07 / yii2-qazaq-transliterator

1. Go to this page and download the library: Download altynbek07/yii2-qazaq-transliterator 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/ */

    

altynbek07 / yii2-qazaq-transliterator example snippets


public function behaviors()
{
    return [
        'transliterate' => [
            'class' => 'altynbek07\yii2QazaqTransliterator\QazaqTransliteratorBehavior',
            'attributes' => 'name',
        ]
    ];
}

public function behaviors()
{
    return [
        'transliterate' => [
            ...
            'attributes' => ['name', 'text'],
            ...
        ]
    ];
}

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
            ...
        ]
    ];
}