You are currently browsing the tag archive for the 'I18n' tag.
Just uploaded the my last weeks Rub-b presentation about fast gettext here.
The simples solution i could come up with, convert all chars to their base (á -> a), using String.tr would be ideal for this task, but its not UTF8 aware…
If you dare to digg deeper, more information can be found on wiki and on coding horror
list.sort_by{|name| convert_umlaut_to_base(name)}
def convert_umlaut_to_base(input)
text = input.dup
%w[áäa ÁÄA óöo ÓÖO íi ÍI úüu ÚÜU ée ÉE ßs].each do |set|
text.gsub!(/[#{set[0..-2]}]/,set[-1..-1])
end
text
end
