pluralize
-
Arguments:
{String} single, [double, triple, ...]
-
Usage:
Pluralizes the argument based on the filtered value. When there is exactly one argument, plural forms simply add an “s” at the end. When there are more than one argument, the arguments will be used as array of strings corresponding to the single, double, triple … forms of the word to be pluralized. When the number to be pluralized exceeds the length of the arguments, it will use the last entry in the array.
-
Example:
{{count}} {{count | pluralize 'item'}}
1 => ‘1 item’
2 => ‘2 items’{{date}}{{date | pluralize 'st' 'nd' 'rd' 'th'}}
Will result in:
1 => ‘1st’
2 => ‘2nd’
3 => ‘3rd’
4 => ‘4th’
5 => ‘5th’
Please login to continue.