Open gucki opened 9 years ago
That's very interesting. I don't know offhand how Ruby handles this, but some systems like mysql allow a language/country sort "collation" to be set.
Hmm... here's a somewhat outdated Ruby library for that purpose. So it looks like we need to figure out if this is something that should be in this gem, or something we can do in the Ruby environment.
This JavaScript library allows setting a custom alphabet.
I guess this wouldn't solve all cases, but a good portion of it, especially if it's optional. In case people need more than one language they'd have to roll it themselves, but maybe that's a tradeoff between having to maintain different alphabets or collations within this gem and not having that option at all.
The transliterate strategy is interesting: I guess the implication is that German sort order follows the transliterated spelling, or it's at least close to it? (I'm fluent in German, but not familiar with the alpha ordering.)
It looks like there's a Duden way and a telephone book way: https://german.stackexchange.com/a/1798/1106
Telephone book = transliteration Duden = pretend like the diacritical doesn't exist. Weird.
Is:
Correct would be: