Search code examples
ruby-on-rails-3internationalizationpluralizecldr

Are the CLDR pluralization rules predefined in Rails 3 or do you have to manually define them?


And if you do have to add the rules manually, where and how do you add them?

I was trying with :locale => "fr" and according to http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html , everything within 0..2 should be in the "one" form, but I'm getting the "other" form using the value "1.5".

EDIT: I'm talking about these https://github.com/svenfuchs/i18n/blob/master/test/test_data/locales/plurals.rb


Solution

  • # Note that <tt>I18n::Backend::Simple</tt> only supports an algorithm for English
    # pluralization rules. Other algorithms can be supported by custom backends.
    

    Source I18n.rb