-
I'm thinking about replacing the current URL transliteration function with this one. Does anyone know if it'll work fine?
if (function_exists('transliterator_transliterate')) { $s = transliterator_transliterate('Any-Latin; Latin-ASCII; Lower()', $s); }-
Hello @Ivan Mishchenko !
Yes, you set the almost ideal syntax. It's only left to add the space processing, smth like:
$s = "Кириллическое предложение!"; $s = transliterator_transliterate("Any-Latin; Latin-ASCII; Lower()", $s); $s = preg_replace('/[^a-z0-9\s-]/', '', $s); $s = preg_replace('/[\s-]+/', '-', trim($s)); -
-