When I add a retailer with Turkish character, those Turkish characters are omitted in the URL.
The funciton is;
function friendlyURL($string, $down = 0)
{
$string = preg_replace("`\[.*\]`U","",$string);
$string = preg_replace('`&(amp;)?#?[a-z0-9]+;`i','-',$string);
$string = htmlentities($string, ENT_COMPAT, 'utf-8');
$string = preg_replace( "`&([a-z])(acute|uml|circ|grave|ring|cedil|slash|tilde|caron|lig|quot|rsquo);`i","\\1", $string );
$string = preg_replace( array("`[^a-z0-9]`i","`[-]+`") , "-", $string);
if ($down == 1)
{
$string = str_replace('-','_',$string);
return strtolower(trim($string, '_'));
}
else
{
return strtolower(trim($string, '-'));
}
}
The url for the retailer named "deneme mağazası" is as "domain.com/deneme-ma-azas-site"
How the Turkish characters can be converted?