Skip to content

Simple class which transliterates strings from cyrillic to latin and vice-versa

License

Notifications You must be signed in to change notification settings

oblakstudio/transliterator

Repository files navigation

Transliterator

Convert serbian cyrillic text to latin and vice-versa

Packagist Version Packagist PHP Version

Installation

You can install the package via composer:

$ composer require oblak/transliterator

Usage

<?php

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

use Oblak\Transliterator;

echo Transliterator::cirToLat('Четири Чавчића риби гризу реп!');    // Četiri Čavčića ribi grizu rep
echo Transliterator::cirToCutLat('Четири Чавчића риби гризу реп!'); // Cetiri Cavcica ribi grizu rep
echo Transliterator::latToCir("Da l' si ikada mene voljela?");      // Да л' си икада мене вољела?

Benchmarks

Benchmark suite for PHPBench to compare various replacement methods.
We benchmark strtr, str_replace, preg_replace.

To execute the benchmarks you can run the following command:

$ composer bench

About

Simple class which transliterates strings from cyrillic to latin and vice-versa

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Contributors 3

  •  
  •  
  •