2017 © Pedro Peláez
 

library translit

Russian-English Yandex transliteration package primarily for making slugs

image

denismitr/translit

Russian-English Yandex transliteration package primarily for making slugs

  • Friday, July 14, 2017
  • by denismitr
  • Repository
  • 1 Watchers
  • 7 Stars
  • 370 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 1 Open issues
  • 5 Versions
  • 3 % Grown

The README.md

Yandex-standard russian-english transliteration

Version

3.0 requires PHP >= 7.2, (*1)

Author

Denis Mitrofanov denis.mitr@gmail.com, (*2)

Installation

composer require denismitr/translit

Usage

    $translit = new \Denismitr\Translit\Translit();

    $slug = $translit->transform("Строка для транслитерации, по правилам Яндекс!");
    //stroka-dlya-transliteracii-po-pravilam-yandeksa

To define max length of the output do:, (*3)

$slug = (new \Denismitr\Translit\Translit)->transform("очень длинный текст...", 10);
// ochen-dlin

You can provide your own translit implementation as long as it implements the \Denismitr\Translit\TranslitStrategy interface and inject it into the Translit class constructor, this way it will override the default behavior like so:, (*4)

new \Denismitr\Translit\Translit(new YourTranslitStrategyImpl());

Run tests

composer test

The Versions

14/07 2017

dev-master

9999999-dev

Russian-English Yandex transliteration package primarily for making slugs

  Sources   Download

MIT

The Requires

  • php >=5.6.0

 

The Development Requires

14/07 2017

v2.3

2.3.0.0

Russian-English Yandex transliteration package primarily for making slugs

  Sources   Download

MIT

The Requires

  • php >=5.6.0

 

The Development Requires

27/11 2016

v2.2.5

2.2.5.0

Russian-English Yandex transliteration package primarily for making slugs

  Sources   Download

MIT

The Requires

  • php >=5.6.0

 

The Development Requires

31/10 2016

v2.1.0

2.1.0.0

Russian-English Yandex transliteration package primarily for making slugs

  Sources   Download

MIT

The Requires

  • php >=5.6.0

 

The Development Requires

20/10 2016

v2.0.0

2.0.0.0

Russian-English Yandex transliteration package primarily for making slugs

  Sources   Download

MIT

The Requires

  • php >=5.6.0

 

The Development Requires