Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

“Internationalized” SEO urls
 
Jonathan Hedrén
Member
 
Total Posts:  67
Joined:  2007-08-31
Sweden
 

When adding a product with for example ‘Ã¥’, ‘ä’ or ‘ö’ in it’s name and a SEO-url is automaticly created for the product, the Ã¥’s, ä’s and ö’s are substituted with ‘-’. It would be nice if special characters where substituted with their “cousins”, i.e.  ‘Ã¥’ and ‘ä’ would be substituted with ‘a’ and ‘ö’ would be substituted with ‘o’.

 
Magento Community Magento Community
Magento Community
Magento Community
 
CirTap
Jr. Member
 
Avatar
Total Posts:  30
Joined:  2008-02-16
 

Hi,
interesting..

This should be fairlyy easy to implement, ‘cos “transliteration” is just a flag in PHP’s built-in UTF8 encoding/transcoding functions.
Transliterating german umlauts such as ä, ö, ü, ß, however, *must* result in ae, oe, ue, ss. Missing an ‘e’ may result into total different word meanings wink
AFAIK the same applies to languages using kyrillic characters. There shouldbe “offical” transliteration tables for non-ASCI script.

Here’s some code borrowed from Joomla! 1.5

function transliterate($string)
{
    $string 
htmlentities(utf8_decode($string));
    
$string preg_replace(
        array(
'/ß/','/&(..)lig;/''/&([aouAOU])uml;/','/&(.)[^;]*;/'),
        array(
'ss',"$1","$1".'e',"$1"),
        
$string);
    return 
$string;
}

Have fun,
CirTap

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top