A
A
Andrey Markov2017-10-11 13:29:56
Yii
Andrey Markov, 2017-10-11 13:29:56

How does yii2 Inflector::slug transliteration work?

Good afternoon, I can't deal with the Inflector helper.
This method does an excellent job of transliterating from German into English or from French into English, but unfortunately, I personally have problems with Cyrillic, if I call the Inflector::transliterate() method, then I get the same string with Cyrillic as the output, and the slug method () generally removes the entire Cyrillic alphabet.
Considered the author's version.
play-stop.ru/yii2/3-sposoba-sdelat-transliteraciyu...
but alas, this did not work at all.
Is it possible to make Cyrillic transliteration a given class, or do you still need to look for third-party solutions?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Maxim Fedorov, 2017-10-11
@DmitriyFrolov

Inflector also works with Cyrillic. If it doesn't work for you, then the problem is in your project, for example, the string you are trying to process is not in UTF. In general, you need to debug ...

N
notnaa, 2019-09-04
@notnaa

Good afternoon, make sure you have the intl extension enabled in php.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question