Skip to content

Instantly share code, notes, and snippets.

@grotezo
Created Aug 8, 2010
Embed
What would you like to do?
I18n.backend.add_pluralizer(:ru,
lambda{ |c| \
c == 0 ? :none \
: (c % 10 == 1 && c % 100 != 11) ? :one \
: ((5..9).include?(c % 10) || (11..14).include?(c % 100) || c % 10 == 0) ? :many \
: (2..4).include?(c % 10) ? :few \
: :other })
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment