在Django中使用复数时人性化句子

tom*_*ell 5 django django-templates pluralize

在使用Django模板复数过滤器的句子中定义的最佳方法是什么?例如:

<p>
    Your item{{ items|length|pluralize }}
    is/are
    currently being processed and will ship soon.
</p>
Run Code Online (Sandbox Code Playgroud)

Roh*_*han 8

如最后一个示例所示pluralize,您可以尝试

Your item{{ items|length|pluralize:" is,s are" }}
currently being processed and will ship soon.
Run Code Online (Sandbox Code Playgroud)