0

I have locale messages the below:

timing: {
  viewer: {
    count: 'нету таймингов | 1 тайминг | 2 тайминга | 3 тайминга | 4 тайминга | {count} таймингов'
  }
}

My template the below:

<span>{{ $tc('timing.viewer.count', 50, {count: 50}) }}</span>

Output the below:

<span>2 тайминга</span>

Why?? tag span must have "50 таймингов"

  • 1
    Looks like a bug, pluralize translation string doesn't support more than 3 arguments. – Igor Aug 28 '18 at 09:12

1 Answers1

1

Your template is wrong.

Try it like this

timing: {
 viewer: {
   count: 'нету таймингов | 1 тайминг | {count} таймингов'
  }
}

When using the count version of $tc i18n will look at the 3rd argument in the template.

Radu Diță
  • 13,476
  • 2
  • 30
  • 34
  • 2
    But do not forget that the Slavic languages are more difficult with pluralization and you need a custom function In this case, you forgot to consider these values: 2 тайминга | 3 тайминга | 4 тайминга – SmelayaPanda Dec 06 '19 at 09:11