Closed Haroenv closed 9 years ago
Well the word + 's'
trick indeed won't work in multiple languages. Although like this it does work:
plur('pony', 'ponies', 2);
//=> 'ponies'
I guess if you want better support for multiple languages that's kinda out of scope for this module.
Well the word + 's' trick indeed won't work in multiple languages.
That said, it's actually like this in quite a bit of languages other than English.
If there were somehow a way to input the language, this would also work in Dutch, providing that this rule is followed:
De apostrof wordt gebruikt bij de meervouds-s van woorden die eindigen op a, e, i, o, u of y, voorafgegaan door een medeklinkerletter of lettergreepgrens.
Which means that there should be an apostrof after a vowel (some other intricacies, but this would be close enough)
There are many better modules that a more feature rich. I just needed a quick super naive one.
It seems useful that this doesn't just work in English