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

Linked message and pluralization #1482

Open zanzara opened 2 years ago

zanzara commented 2 years ago

Clear and concise description of the problem

In some languages (as german i.e.) there exists the Genitive case in mostly appending a 's' char at the end. So I tried to solve it with pluralization:

auth: {
  labels: {
     password: "Passwort | Passworts",
...     
    password: {
        change: {
          error: "Fehler beim Ändern des @:auth.labels.password{'s'}"

but my problem is, to have it choiceabel in a linked message!?! Of course , I can put a traling {'s'} but I wish to have a solution as this i.e. @:auth.labels.password{[2]} @:auth.labels.password|2

Suggested solution

To have the ability to add the proper index into the linked message @:auth.labels.password{[index]} or @:auth.labels.password|index

Alternative

No response

Additional context

I hope, this topic wasn't discussed somwhere yet. I couldn't find anything regarding such an approach. Using: "vue": "^3.0.0", "vue-i18n": "^9.0.0",

Validations

zanzara commented 2 years ago

Please delete this post because it is in the wrong repo by my mistake. Sry for that. I shift it to https://github.com/intlify/vue-i18n-next