Hello ? As i see, your transliteration function dont know about other languages and dont can make correct url for its.
For example, urls for posts with cyrillic names in our installed forum has urls like this: http://our-website/d/9--
For make always correct urls you can use PHP Intl Transliterator extension.
For example, you can use this snippet of code for transliterate any strings to latin characters (even japanese characters, as I know)
$str = 'Какая-то строка, которая нуждается в транслитерации';
$stransliteratedStr = transliterator_transliterate('Any-Latin; Latin-ASCII; [\u0080-\uffff] remove',$str);
// Kakaa-to stroka, kotoraa nuzdaetsa v transliteracii
I think, it can make you forum more convenient for people who speak other languages.
You can find more info about this transliterator functions in sources of Yii 2 framework, for example.