3 module PluralizationFallback
4 def pluralize(locale, entry, count)
6 rescue InvalidPluralizationData => ex
7 raise ex unless ex.entry.key?(:other)
15 def default_fallbacks_with_validation
16 default_fallbacks_without_validation.select do |locale|
17 ::I18n.available_locales.include?(locale)
21 alias_method_chain :default_fallbacks, :validation
26 I18n::Backend::Simple.include(I18n::Backend::PluralizationFallback)
27 I18n::Backend::Simple.include(I18n::Backend::Fallbacks)
29 I18n.fallbacks.map("no" => "nb")
31 I18n.enforce_available_locales = false
33 Rails.configuration.after_initialize do
34 I18n.available_locales