Magento Unicode URL Key for Products, Categories, CMS Pages

By default Magento does not support using UTF-8 characters as URL Keys, this tutorial show you how to make Magento accept non-english characters for Products, Categories and CMS pages.

This solution have been tested on Magento CE

1- Open \app\code\core\Mage\Core\Controller\Request\Http.php . At the setPathInfo method replace:

$requestUri = $this->getRequestUri();


$requestUri = urldecode($this->getRequestUri());

2- Open \app\code\core\Mage\Catalog\Model\Product\Url.php and at the formatUrlKey method replace:

$urlKey = preg_replace('#[^0-9a-z]+#i', '-', Mage::helper('catalog/product_url')->format($str));
$urlKey = strtolower($urlKey);


$urlKey = preg_replace('#()*!~-=+|\/[^0-9a-z%]+#i', '-', Mage::helper('catalog/product_url')->format($str));
$urlKey = str_replace(' ', '-', $urlKey);
$urlKey = mb_strtolower($urlKey,'UTF-8');

3- Open \app\code\core\Mage\Catalog\Model\Category.php and at the formatUrlKey method replace:

$urlKey = preg_replace('#[^0-9a-z]+#i', '-', $str);
$urlKey = strtolower($urlKey);


$urlKey = preg_replace('#()*!~-=+|\/[^0-9a-z%]+#i', '-', $str);
$urlKey = str_replace(' ', '-', $urlKey);
$urlKey = mb_strtolower($urlKey,'UTF-8');

4- Open \app\code\core\Mage\Cms\Model\Resource\Page.php and at the _beforeSave add this code after first foreach:

//shm: url key utf8
$str = $object->getData('identifier');
$identifier = preg_replace('#()*!~-=+|\/[^0-9a-z%]+#i', '-', $str);
$identifier = str_replace(' ', '-', $identifier);
$identifier = mb_strtolower($identifier,'UTF-8');
$identifier = trim($identifier, '-');
$object->setData('identifier', $identifier);
//shm: url key utf8

 Also at the same file find isValidPageIdentifier method and replace:

return preg_match('/^[a-z0-9][a-z0-9_\/-]+(\.[a-z0-9_-]+)?$/', $object->getData('identifier'));


return TRUE; 

5- Open \app\code\core\Mage\Adminhtml\Block\Cms\Page\Edit\Tab\Main.php and at the _prepareForm method replace:

$fieldset->addField('identifier', 'text', array(
  'name' => 'identifier',
  'label' => Mage::helper('cms')->__('URL Key'),
  'title' => Mage::helper('cms')->__('URL Key'),
  'required' => true,
  'class' => 'validate-identifier',
  'note' => Mage::helper('cms')->__('Relative to Website Base URL'),
  'disabled' => $isElementDisabled


$fieldset->addField('identifier', 'text', array(
  'name' => 'identifier',
  'label' => Mage::helper('cms')->__('URL Key'),
  'title' => Mage::helper('cms')->__('URL Key'),
  'required' => true,
  'class' => '',
  'note' => Mage::helper('cms')->__('Relative to Website Base URL'),
  'disabled' => $isElementDisabled
This is the code responsible for javascript validator at admin CMS pages, as default it only accepts english characters. This managed by adding validate-identifier class to related textfield. By commenting this line out admin can enter every character includes non-english characters. 

And don't forget to clear the cache. Also if you enabled compilatopn, Run Compilation Process.


Posted by Jose on
good ,
the changes works, but doesn´t work for second estore (alias) in multisotre. and the especial character á,é,í,ó,ú doesn´t works
Posted by dean on
this post helps me a lot, and save my money to buy extension, thanks a lot.
Posted by Alekos on
What files need to be changed in order to make it work on Magento 2?
Posted by saman on
it works for me on magento
Thanks a lot.
Posted by Raffael on
to be able to use hebrew letters or á,é,í,ó,ú - changes need to be made to:
$_convertTable in Mage/Catalog/Helper/Product/Url.php
Posted by ShowGaR on
Looking for the best app to watch free movies on your Android phone? Then your should check Showbox APK. This is the most famous app today that has a big library of shows and films. This app is also available for computer users. But your need to download it first to enjoy free films Showbox for PC Windows
Posted by HorazePsymn on
viagra coupon - viagra for sale viagra from canada online inbox
viagra for sale - buy viagra online $0 99 pill overnight shipping
viagra testamonials
Posted by RobertRic on
Hello everyone!
I want to present you the best site for sex Dating. - Click on me - .
Приветик всем!
Хочу представить вам лучший сайт для секс знакомств. - Нажми на меня.
Posted by avuqabehojo on - Prednisone Prednisone Without Dr Prescription
Posted by vilajdzip on - Buy Prednisone Prednisone No Prescription
Posted by ezefohohva on - 23 Buy Prednisone Online
Posted by Anthonymow on
tim allen drug dealer wacom tablet intuos 5
Posted by Zartyfrert on
levitra vs levitra forum guestbook.asp?action= - buy generic levitra online
levitra pills cheap yabb
generic levitra online
- levitra 20mg you cannot delete your posts in this forum
levitra vs levitra comparison board.cgi?mode=
Posted by Tozmyvom on
alternative viagra cialis viagra alternatives uk - generic viagra
cialis 10 mg effectiveness users browsing this forum
viagra usa
- cialis and alcohol sort by
cialis supplier
Posted by Zauriceemelt on
levitra for women blogs linear mode - levitra 20 mg
levitra 20 mg cost no registered users and
levitra for sale
- levitra prices uk
24 hours levitra