Open pejuko opened 9 years ago
This is a tricky proposition. There's a good discussion on the topic at stackoverflow.
Have any ideas in mind?
I would use the transliteration method and compare those ascii representatives. It does not give best results but it does not dependent on any native library. (btw. this method is used also by google when sorting language names for translation, it does not give always correct result but it is better than have them at the end of list). I have just discoverd that i18n supports transliteration and is customizable. See https://bibwild.wordpress.com/2014/06/26/ascii-ization-transliteration-built-into-ruby-i18n-gem-in-rails/ and http://apidock.com/rails/ActiveSupport/Inflector/transliterate
With :cs locale is 'čeština' at the end of list (after z) should be after 'cebuánština'