Any php-expert could tell me if this would fix my problem?
Get the original STr.php from Flarum Core...
public static function slug($str)
{
$str = strtolower($str);
$str = preg_replace('/[^a-z0-9]/i', '-', $str);
$str = preg_replace('/-+/', '-', $str);
$str = preg_replace('/-$|^-/', '', $str);
return $str;
}
And then replacing it for this one...
public static function slug($str)
{
$str = transliterator_transliterate('Any-Latin; Latin-ASCII; [\u0080-\uffff] remove', $str);
$str = strtolower($str);
$str = preg_replace('/[^a-z0-9]/i', '-', $str);
$str = preg_replace('/-+/', '-', $str);
$str = preg_replace('/-$|^-/', '', $str);
return $str ?: '-';
}
Update: Seems don't work well. There was an error when I tried to publish something.