Answer the question
In order to leave comments, you need to log in
Correct localization in Modx when dealing with plurals?
How to do localization in modx when working with plurals?
1, 21, 31… day
2, 3, 4… days
5, 6, 7… days
So far, just this snippet idea:
return (n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)
select
a filter, but I have not tried it. Can it be used instead of a complex design?
Answer the question
In order to leave comments, you need to log in
The repository has the Units package - exactly what you need in this case.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question