Closed afbora closed 8 years ago
I won't fix this for now. I need to find a better solution here in general. In German the matching fits so I think we need language based translations somehow, but this needs more work and thinking.
I want to give an example from CodeIgniter framework. https://github.com/bcit-ci/CodeIgniter/blob/develop/application/config/foreign_chars.php
So for example on Kirby:
if /site/config/foreign_chars.php
file exists, override foreign characters otherwise set defaults.
This feature is optional not required so will only use users who have needs.
I agree with Bastian that finding a different approach to this (probably based on translations) might be the better way to go.
Until then, you can easily use something like this in your config.php
:
str::$ascii = a::merge(str::$ascii, array(
'/Ä/' => 'A',
'/æ|ǽ|ä/' => 'a',
'/œ|ö/' => 'o',
'/Ö/' => 'O',
'/ö/' => 'o',
'/Ü/' => 'U',
'/ü/' => 'u',
));
@distantnative great solution :+1: Tested and works perfect!
In our language as turkish, some chars broken on url address. I just implement that ascii chars can set from options.
Wrong convert: Üsküdar > ueskuedar Right convert: Üsküdar > uskudar
Wrong convert: Öğrenci > oegrenci Right convert: Öğrenci > ogrenci
Sample Usage