Category : intl

use SymfonyComponentStringSluggerAsciiSlugger; require ‘../../vendor/autoload.php’; $s = new AsciiSlugger(‘ru’); $str = ‘стараться’; echo $s->slug($str)->lower(); This code use russian-latin/bgn transliteration rules from php intl extension 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 ..

Read more

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 ..

Read more

Trying to use Twig Intl extra functions without passing arguments (expecting function get default locale). If I pass ‘EUR’ argument to format_currency filter, it works perfectly: {{ item.itemPrice|format_currency(‘EUR’) }} {# returns 10 € #} If I don’t pass any argument, Twig documentation says: “By default, the filter uses the current locale”, but I’m getting this ..

Read more