bacart/transliteration

Bacart transliteration library

v0.1.16 2019-06-21 08:08 UTC

README

PHP from Packagist Latest Stable Version Total Downloads License

Allows to transliterate and trim UTF-8 strings.

Installation

Using command line:

Run the following command and you will get the latest version by Packagist.

composer require bacart/transliteration
Using composer.json

To use the newest (maybe unstable) version add following into your composer.json:

{
    "require": {
        "bacart/transliteration": "dev-master"
    }
}

Usage example

use Bacart\Transliteration\Transliteration;

...

echo Transliteration::transliterate('Привет, Мир!');
echo Transliteration::transliterate('さようなら');
Output:
privet-mir
sayounara

Long text example

echo Transliteration::transliterate('Some very long slug text', 20);
Output:

some-very-long-slug

License

This project is released under the MIT license.

About

Project development is led by the Bacart team.