kazupon / vue-i18n

:globe_with_meridians: Internationalization plugin for Vue.js
https://kazupon.github.io/vue-i18n/
MIT License
7.28k stars 861 forks source link

Conditional pluralization #390

Open p1pchenk0 opened 6 years ago

p1pchenk0 commented 6 years ago

Hello, is it possible to include conditional pluralization feature like in formatJS library: "items": "{num, plural, =0 {no item} =1 {one item} =2 {two items} =10 {many items} other {# items}}" Because some languages have additional writing cases based on a number (not only one/many)

manash-khamari commented 6 years ago

@kazupon : Is this feature coming in the upcoming release?"

Ideally you can have this as interval based: Something like this:

(60-119){1 minute ago} | (120-3599){ {minute} minutes ago} | (3600-7199){1 hour ago} | (7200-172800){ {hour} hours ago}

exoego commented 6 years ago

@kazupon mentioned in https://github.com/kazupon/vue-i18n/issues/78#issuecomment-396798523 that he is considering Conditional Pluraization in ICU format standard, which formatJS is also built on.