pluralize
Filter
Return a word or its plural form depending on the value of a number.
Parameters
Parameter | Required | Description |
---|---|---|
singular_word
|
Yes |
string Word to return if the number’s value is not 1 .
|
plural_word
|
Yes |
string Word to return if the number’s value is 1 .
|
Category
Description
The pluralize
filter accepts 2 parameters: a singular form of a word and a plural form
of the word. It then chooses which word to return based on the number being filtered.