Module: MiniI18n::Pluralization

Defined in:
lib/mini_i18n/pluralization.rb

Class Method Summary collapse

Class Method Details

.pluralize(mappings, count, locale = MiniI18n.locale) ⇒ Object


3
4
5
6
# File 'lib/mini_i18n/pluralization.rb', line 3

def self.pluralize(mappings, count, locale = MiniI18n.locale)
  rule = MiniI18n.pluralization_rules.fetch(locale.to_sym, default_rule)
  mappings[rule.call(count)]
end