Custom URL Romanization

Unmaintained Custom URL Romanization 1.0

No permission to download
Compatible XF 1.x versions
  1. 1.2
License
http://creativecommons.org/freeworks
Visible branding
No
This add-on will romanize any defined character of your choosing. I've needed a script that do that for my board that had forums and thread titles written in Turkish.

Special thanks to xfrocks who originally made this for the Vietnamese language but allowed me to share and help me modify it to suit my own needs. For those who have similar demands regarding url romanization simply modify it to your own need by modifying the library/TurkishFriendlyLink/listener.php file

Note: Testing showed that you need to disable the "Romanize url" option in order to make use of this add-on. It would be kind of unnecessary otherwise.

PHP:
        static $mapLower = array(
            'o' => array('ö'),
            'c' => array('ç'),
            'g' => array('ğ'),
            's' => array('ş'),
            'u' => array('ü'),
            'a' => array('â'),
            'e' => array('ê'),
            'i' => array('ı', 'î', 'é'),
        );

        static $mapUpper = array(
            'O' => array('Ö'),
            'c' => array('Ç'),
            'g' => array('Ğ'),
            's' => array('Ş'),
            'u' => array('Ü'),
            'a' => array('Â'),
            'e' => array('Ê'),
            'i' => array('I', 'Î', 'Ê'),
        );
    • The first arrays are for lowercase letters (mapLower ) and the second set are for uppercase letters (mapUpper )
    • Write the letters you want to be Romanized to the right like you see above.
    • If there are more than one guilty letter, combine it like in the example above (the last array).
    • You can also rename addon to whatever you like. I myself changed what was originally "Vietnamese" to "Turkish" and everywhere else. Don't forget to update the xml, FileSums.php, listener.php files as well as the TurkishFriendlyLink folder to your preference.
Author
yavuz
Downloads
90
Views
1,245
First release
Last update

Ratings

5.00 star(s) 1 ratings

More resources from yavuz

Latest reviews

Great
Back
Top Bottom