【发布时间】:2015-11-24 07:30:47
【问题描述】:
我正在使用移植到我的框架中的 Symfony Translations。我在文档中找到了这个:
'{0} There are no apples|{1} There is one apple|]1,19] There are %count% apples|[20,Inf[ There are many apples'
The above string specifies four different intervals: exactly 0, exactly 1, 2-19, and 20 and higher.
来源:http://symfony.com/doc/current/components/translation/usage.html#explicit-interval-pluralization
我的问题是我需要为1.5 使用与1 不同的复数形式。我怎样才能做到这一点?当我将1.5 作为计数参数传递时,它得到1 复数分配。
我认为将间隔指定为]1,something] 会起作用,但根据文档,它与[2,something] 基本相同(在这种情况下,我无论如何都看不到使用]1 的意义)。如何覆盖1.5 复数?
【问题讨论】: