vue-filter
vue-filter copied to clipboard
Feature request: pluralize
Pluralize filters:
{{ count | pluralize('comment') }}
Could be simple just add an S at the end, and add optional parameter for custom values like
pluralize(word, [word_in_plural], [word_if_zero])
{{ count | pluralize('comment', 'comments', 'no comments') }}
@alfonsobries
This pluralize function may useful in the English world, but I think it is not very common use. I am not sure. Perhaps in the English language environment it is often used.
I recommend you implement this function based on your custom requirement. There are some JavaScript package do this well, and I am not sure I can implement this function well. Sometimes I don't know how to add s
, es
and y->i + es
properly. :(