tonsky / tongue

Do-it-yourself i18n library for Clojure/Script
Eclipse Public License 1.0
307 stars 19 forks source link

Pluralise? #9

Closed cjohansen closed 6 years ago

cjohansen commented 6 years ago

Would you be interested in a pull request that makes vectors a valid value in dictionaries, as a way of pluralising translations?

{:en {:bananas ["No bananas" "A banana" "Two bananas" "{1} bananas"]}}
tonsky commented 6 years ago

The trick is it only works this way for english. For other languages rules are pretty crazy. It means pluralisers would have to be locale-specific, and I don’t want to include any locale-specific code in Tongue (because if I include one I’ll have to include all of them)