D
D
Dinar Garipov2013-11-17 03:18:31
Laravel
Dinar Garipov, 2013-11-17 03:18:31

What is the package for Laravel 4 to transliterate Russian to Latin?

Good afternoon.
Maybe someone knows some package for Laravel 4 to transliterate Russian into Latin?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
Dialog, 2013-11-17
@gaaarfild

I did not find a special bundle, but you can write it from 0. Alternatively, here is a helper method for php 5.4 and higher:

public static function transliterate($string)
{
    $transliterator = \Transliterator::create('latin; NFKD; [^\u0000-\u007E] Remove; NFC');
    $transliterated = $transliterator->transliterate($string);
    $transliterated = preg_replace('/[^a-zA-Z]/', '_', $transliterated);
    $transliterated = trim($transliterated, '_');

    return $transliterated;
}

H
hbuser, 2014-03-05
@hbuser

Have you tried going to packagist?
https://packagist.org/packages/jbroadway/urlify
Russian language support. Installed by regular laravel means (composer).

F
fenric, 2017-08-04
@fenric

https://anatoly.fenric.ru/development/cpu-adresa-n...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question