You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 31, 2024. It is now read-only.
I use vue-i18n via another lib nuxt-i18n so I doesn't have direct access to the library to override getChoiceIndex method in a clean way as it described in the documentation and my personal opinion is that it looks dirty to to this at all. Instead, what I like is to be able to do override this method via default vue-i18n config object. The syntax is pretty simple:
new VueI18n({
locale: 'pl', // set locale
getChoiceIndex(choice, choicesLength) {
// Custom pluralization code goes here
}
})
I use
vue-i18nvia another libnuxt-i18nso I doesn't have direct access to the library to overridegetChoiceIndexmethod in a clean way as it described in the documentation and my personal opinion is that it looks dirty to to this at all. Instead, what I like is to be able to do override this method via default vue-i18n config object. The syntax is pretty simple:so when using nuxt-i18n module I can simply do:
I think such approach is much more cleaner to use!