use SymfonyComponentStringSluggerAsciiSlugger;
require '../../vendor/autoload.php';
$s = new AsciiSlugger('ru');
$str = 'стараться';
echo $s->slug($str)->lower();
This code use russian-latin/bgn (https://en.wikipedia.org/wiki/BGN/PCGN_romanization_of_Russian) transliteration rules from php intl extension (https://www.php.net/manual/en/class.transliterator.php) inside symfony.
The problem is that it adds extra separator between t and s symbols due to extended rules.
starat-sya
I found that exists simplified russian-latin/bgn rules, but I can’t realise how to configure it or does it implemented in intl extension.
Is there any solutions?
Source: Symfony Questions
Was this helpful?
0 / 0