Skip to content
Uzbek latin <=> cyrillic transliterator
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.


Type Name Latest commit message Commit time
Failed to load latest commit information.

Uzbek transliterator

Latest Version on Packagist Software License Build Status Coverage Status Quality Score Total Downloads

Uzbek latin <=> cyrillic transliterator. Under the hood it uses some online transliteration services. But it's extendable!

Navigation by sections


Via Composer

$ composer require zvermafia/uzbek-transliterator


Out of the box there are two implementations for your choice:

  1. Zvermafia\Transliteration\AlifTransliterator which uses an online transliteration service's API;
  2. Zvermafia\Transliteration\LotinTransliterator which uses a online transliteration service's API;

Also you can implement your own class which will use another service's API or won't use any services' API and does all the job by itself.

require __DIR__ . "/vendor/autoload.php";

// Initialize the object
$transliterator = new Zvermafia\Transliteration\AlifTransliterator(); // or you can use LotinTransliterator

$transliterator->setText("Salom, dunyo!")

echo $transliterator->getResult(); // it will output: Салом, дунё!

Make your own implementation (extending)

If these two already exist implementations aren't enough for you, then you can extend functionalities of this package by implementing your own transliterator class. If so there are three possible ways:

  1. Create a class by implementing a Zvermafia\Transliteration\Interfaces\TransliteratorInterface interface. In this case you must realize all the methods defined in the interface from scratch by yourself;
  2. This is the recommended way (if you're not going to use third party APIs with HTTP). Create a class by extending Zvermafia\Transliteration\Abstracts\TransliteratorAbstract abstract class. In this case you must realize only that methods which aren't already realized by the abstract class. The abstract class already realized common methods of the interface;
  3. This one is similar to the previous way. Because in this case you'll use a Zvermafia\Transliteration\Abstracts\HttpTransliteratorAbstract abstract class which is extends by the Zvermafia\Transliteration\Abstracts\TransliteratorAbstract. But what is the difference? The difference is in this abstract class realized some common methods which will work with the HTTP through the cURL extension. So you must only configure some specific HTTP request parameters to work with an API.

So here are examples by the points.

An example for the point number 1:


namespace Whatever\Namespace;

use Zvermafia\Transliteration\Interfaces\TransliteratorInterface;

// point #1
class MyTransliterator implements TransliteratorInterface
    // realize all the methods defined in the interface (

An example for the point number 2:


namespace Whatever\Namespace;

use Zvermafia\Transliteration\Abstracts\TransliteratorAbstract;
use Zvermafia\Transliteration\Interfaces\TransliteratorInterface;

// point #1
class MyTransliterator extends TransliteratorAbstract
    public function translit(): : TransliteratorInterface
        $text = $this->getText();
        // $result = ... // here translit the text

        return $this;

An example for the point number 3:

As examples for this point you can see source codes of Zvermafia\Transliteration\AlifTransliterator and Zvermafia\Transliteration\LotinTransliterator.

Change log

Please see CHANGELOG for more information on what has changed recently.


$ composer test


Please see CONTRIBUTING and CODE_OF_CONDUCT for details.


If you discover any security related issues, please email instead of using the issue tracker.



The MIT License (MIT). Please see License File for more information.

You can’t perform that action at this time.