we need to have different mappings for the urlsegment depending on which language is edited. Is there a way to configure this somehow? And also, is there a way to add like "oe" as replacement for "ö"? Today UrlSegment.URLCharacterMap is a char[,] which means that's a problem.
Ps. I have solved this issue with some nasty code, just want to know if there is a best practice I'm missing out on.. :)
I believe you can set the UrlSegment.URLCharacterMap to override the replacement characters, no? It's just a Hastable with set access.
I tried that, but if i add/change to a string instead of a char as replacement, I get a cast exception later on.
I guess it's in internal static string ReplaceIllegalChars(string inputString) it happens.
The URLCharacterMap.URLCharacterMap is a public static property. You could try to setup it somewhere in your bootstraper.
Hmm, so instead of mapping character-character you want character-string instead.
I have tried yet but I think you can overwrite the default ContentProvider.GetUniqueUrlSegment and do the stuff here. It calls to UrlSegment.GetUrlFriendlySegment, which unfortunately un-overridable.
Just not sure if this approach is even nastier than yours :).
Hmm, so instead of mapping character-character you want character-string.
Hehe, I think I'll stick to the current solution. It ignores ä,ö,ü and ß in the character mapping, then in UrlSegment.CreatedUrlSegment I replace them myself with ae, oe, ue and ss.