mildlygeeky / craft-timediff

Adds the Twig Date extension to Craft CMS
15 stars 3 forks source link

Converting unit to it's plural form #1

Open stenvdb opened 8 years ago

stenvdb commented 8 years ago

How would you convert the unit to it's plural form so that it would work for any language?

mildlygeeky commented 8 years ago

Have you looked at the filter I added in version 1.1? That should accomplish what you're looking to do:

https://github.com/mildlygeeky/craft-timediff#translations

stenvdb commented 8 years ago

That always gives me the translated singular unit. So for example, whether it is singular or plural, it always returns me "day" as unit. It should return "day" or "days" no?

mildlygeeky commented 8 years ago

Can you paste in the code and what it is returning? And please verify you’re using 1.1?

stenvdb commented 8 years ago

Yes I am using the latest version. It is returning what it says in the docs: Outputs "past|1|day|singular" or "future|5|month|plural" I'm wondering why it doesn't return "months" instead of "month" when it is plural.

chrisdubya commented 8 years ago

Running into the same issue, any ideas?

johanneslamers commented 7 years ago

For me the same issue. @mildlygeeky any idea how to translate the plural form in another language?

petervdbroek commented 7 years ago

+1