1

According to the documentation, the $number argument of TranslatorInterface::transChoice expects an integer. This is great for things like number of comments and such, but what about non-integers?

Say I want to pluralize an amount of years. My message table entry for English might look like this:

{1} one year|]1,Inf[ %value% years

But if you pass 1.4 to the transChoice, the result would be one year instead of 1.4 years.

Is this simply a limitation of this system? Is there a workaround?

user2323470
  • 183
  • 9

0 Answers0