In Sendwithus you can use the pluralize
filter to change the suffix of a word. Like Django’s pluralize filter it returns a plural suffix if the first argument is an integer greater than 1 or a sequence with more than 1 item. If a plural suffix isn’t specified pluralize
defaults to ’s’.
pluralize(int) pluralize(int, plural) pluralize(int, singular, plural)
pluralize(seq) pluralize(seq, plural) pluralize(seq, singular, plural)
A Simple Example
Data
{
"dog_count": 4
}
Template
I have {{ dog_count }} dog{{ dog_count|pluralize }}.
Rendered
I have 4 dogs.
A More Complicated Example
Data
{
"heroes": [
"Batman",
"Superman",
"Wonder Woman",
"B'wana Beast"
]
}
Template
There {{ heroes|pluralize('is', 'are') }} {{ heroes|count }} super hero{{ heroes|pluralize('es') }}.
Rendered
There are 4 super heroes.