Answer the question
In order to leave comments, you need to log in
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
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;
}
Have you tried going to packagist?
https://packagist.org/packages/jbroadway/urlify
Russian language support. Installed by regular laravel means (composer).
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question