Sha256: 35f47e9661ebfff94cc3c5e8fcc50d0126583da4e984e6a60b1e237a9d73c320
Contents?: true
Size: 579 Bytes
Versions: 3
Compression:
Stored size: 579 Bytes
Contents
# Bosnia and Herzegovina (Bosnian) pluralization rule implementation for rails # Picked up from https://github.com/svenfuchs/i18n/blob/master/test/test_data/locales/plurals.rb # # In order for this to work, add folowing to application.rb # I18n::Backend::Simple.include(I18n::Backend::Pluralization) { :bs => { :i18n => { :plural => { :rule => lambda { |n| n % 10 == 1 && n % 100 != 11 ? :one : [2, 3, 4].include?(n % 10) && ![12, 13, 14].include?(n % 100) ? :few : n % 10 == 0 || [5, 6, 7, 8, 9].include?(n % 10) || [11, 12, 13, 14].include?(n % 100) ? :many : :other } } } } }
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
rails-i18n-0.1.6 | rails/locale/bs.pluralization.rb |
rails-i18n-0.1.5 | rails/locale/bs.pluralization.rb |
rails-i18n-0.1.4 | rails/locale/bs.pluralization.rb |