airbnb / polyglot.js

Give your JavaScript the ability to speak many languages.
http://airbnb.github.io/polyglot.js
BSD 2-Clause "Simplified" License
3.71k stars 208 forks source link

Plural types #80

Closed elGatoMantocko closed 6 years ago

elGatoMantocko commented 7 years ago

Hey guys. Was wondering the proper use of pluralization for this library. It appears that the pluralization types are a bit off. I am wondering if this is something that could be merged in with a PR or if I should fork and use my own.

eg. French differentiates between 0, 1, and 2+. Czech differentiates between 1, 2, 3, 4, 5+.

These types don't quite line up with the plural types object that you have built in this library.

Thanks,

Elliott

ljharb commented 7 years ago

Can you provide some examples?

http://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html#cs suggests that Czech does not in fact distinguish between 2, 3, and 4, for example, and similarly http://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html#fr does not imply that 0 and 1 are distinguished in French.

xpepermint commented 7 years ago

I need to add SL locale.

ljharb commented 7 years ago

@xpepermint thanks, PRs (with docs, tests, and citations) welcome :-)

ljharb commented 6 years ago

I believe the next release will include Slovenian (#113); Czech and French are correct already. Closing.