• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Not a bug Mistake some letter in URL when choose Romanize Titles in URLs options

Affected version
2.x
#1
I am feel very happy when XenForo2.x have this option: Romanize Titles in URLs:
romanize-titles-in-urls.jpg

But I think some letter is mistake. The URLs is not beautiful when use Romanize in my language. And I think this may effect the forum's SEO.
thit-k-ni-that-khong-gian-phong-khach-tan-c-din-2011
mistake-some-letter.jpg


In Xenforo1.x I can customize the URL in the Link.php file very good like this:
thiet-ke-noi-that-khong-gian-phong-khach-tan-co-dien-2011

good-url.jpg

Can you show me the way to fix it?

Sorry, my English not well. I just want to test a lot and report to you to help XenForo2.x become the best.
 
#2
In Xenforo1.x, I open Link.php file, and find
Code:
if ($romanize)
        {
            $title = utf8_romanize(utf8_deaccent($title));
        }
And I insert this code after that, the Url is perfect:
Code:
$aPattern = array (
            "a" => "á|à|ạ|ả|ã|ă|ắ|ằ|ặ|ẳ|ẵ|â|ấ|ầ|ậ|ẩ|ẫ|Á|À|Ạ|Ả|Ã|Ă|Ắ|Ằ|Ặ|Ẳ|Ẵ|Â|Ấ|Ầ|Ậ|Ẩ|Ẫ",
            "o" => "ó|ò|ọ|ỏ|õ|ô|ố|ồ|ộ|ổ|ỗ|ơ|ớ|ờ|ợ|ở|ỡ|Ó|Ò|Ọ|Ỏ|Õ|Ô|Ố|Ồ|Ộ|Ổ|Ỗ|Ơ|Ớ|Ờ|Ợ|Ở|Ỡ",
            "e" => "é|è|ẹ|ẻ|ẽ|ê|ế|ề|ệ|ể|ễ|É|È|Ẹ|Ẻ|Ẽ|Ê|Ế|Ề|Ệ|Ể|Ễ",
            "u" => "ú|ù|ụ|ủ|ũ|ư|ứ|ừ|ự|ử|ữ|Ú|Ù|Ụ|Ủ|Ũ|Ư|Ứ|Ừ|Ự|Ử|Ữ",
            "i" => "í|ì|ị|ỉ|ĩ|Í|Ì|Ị|Ỉ|Ĩ",
            "y" => "ý|ỳ|ỵ|ỷ|ỹ|Ý|Ỳ|Ỵ|Ỷ|Ỹ",
            "d" => "đ|Đ",
        );
        while(list($key,$value) = each($aPattern))
        {
            $title = @ereg_replace($value, $key, $title);
        }
 

Chris D

XenForo developer
Staff member
#3
Unfortunately, we wouldn't class this as a bug.

The code for utf8_romanize can be found in src/vendor/dokuwiki/utf8/utf8.php and search for the text Romanization lookup table.

However, we're unable to provide support for such customisations.