6

My lang file:

AccountNotifications: {
  createdWithName: 'Account «{account}» created',
  created: 'Account created | Accounts created',
}

my submit method

submit() 
   this.$notifications.add({
        type: 'success',
        html: accounts.length === 1
        ? this.$tc('AccountNotifications.created', 1)
        : this.$tc('AccountNotifications.created', 2),
  });

My output

app.js:290949 TypeError: this.$tc is not a function

Whats wrong?

1 Answers1

5

$tc() is not actually needed. The $t() function supports pluralization now.

GeekyMonkey
  • 12,478
  • 6
  • 33
  • 39
  • 1
    Thanks a lot! Was beating myself up over this. The official guide hasn't been updated yet, so I was pretty clueless to why that was happening. – gyohza Nov 23 '21 at 06:18