- Compatible XF Versions
- 2.0
- 2.1
Change URL structure for Turkish characters.
For those who have similar demands regarding url romanization simply modify it to your own need by modifying the src/addons/XDinc/FriendlyURL/Listener.php file.
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.
- Works everywhere (forums, threads, etc.), with minimal conflict.
- Don't upgrade this add-on with old versions (File directories have been changed.)
- Compatible XF versions is 2.x+
For those who have similar demands regarding url romanization simply modify it to your own need by modifying the src/addons/XDinc/FriendlyURL/Listener.php file.
Code:
$mapLower = [
'o' => ['ö'],
'c' => ['ç'],
'g' => ['ğ'],
's' => ['ş'],
'u' => ['ü'],
'a' => ['â'],
'e' => ['ê'],
'i' => ['ı'],
'i' => ['î'],
'i' => ['ê'],
'-' => ['.'],
'_' => ['='],
'_' => ['?'],
'_' => ['*'],
'_' => [','],
'_' => [';'],
'_' => [')'],
'_' => ['('],
'_' => ['{'],
'_' => ['}'],
'_' => ['['],
'_' => [']'],
'_' => ['!'],
'_' => ['+'],
'_' => ['%'],
'_' => ['&'],
'_' => ['#'],
'_' => ['$'],
'' => ['̉', '̣', '̃', '̀', '́'],
];
$mapUpper = [
'O' => ['Ö'],
'C' => ['Ç'],
'G' => ['Ğ'],
'S' => ['Ş'],
'U' => ['Ü'],
'A' => ['Â'],
'E' => ['Ê'],
'İ' => ['I'],
'İ' => ['Î'],
'İ' => ['Ê'],
'-' => ['.'],
'_' => ['='],
'_' => ['?'],
'_' => ['*'],
'_' => [','],
'_' => [';'],
'_' => [')'],
'_' => ['('],
'_' => ['{'],
'_' => ['}'],
'_' => ['['],
'_' => [']'],
'_' => ['!'],
'_' => ['+'],
'_' => ['%'],
'_' => ['&'],
'_' => ['#'],
'_' => ['$'],
'' => ['̉', '̣', '̃', '̀', '́'],
];
Write the letters you want to be Romanized to the right like you see above.