【问题标题】:Are the CLDR pluralization rules predefined in Rails 3 or do you have to manually define them?CLDR 复数规则是在 Rails 3 中预定义的,还是必须手动定义?
【发布时间】:2011-06-17 21:52:36
【问题描述】:

如果您必须手动添加规则,您应该在哪里以及如何添加它们?

我正在尝试使用 :locale => "fr" 并且根据 http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html ,0..2 内的所有内容都应该采用“one”形式,但我正在使用值 " 1.5 英寸。

编辑: 我说的是这些https://github.com/svenfuchs/i18n/blob/master/test/test_data/locales/plurals.rb

【问题讨论】:

    标签: ruby-on-rails-3 internationalization pluralize cldr


    【解决方案1】:
    # Note that <tt>I18n::Backend::Simple</tt> only supports an algorithm for English
    # pluralization rules. Other algorithms can be supported by custom backends.
    

    来源 I18n.rb

    【讨论】:

    • 听起来是个机会。至少已经有几个 CLDR 的 ruby​​ 库了。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2023-01-12
    • 1970-01-01
    • 2013-03-04
    • 2014-08-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多