-
|
Hi, I have a number of scenarios where I'd like to combine both pluralisation and number/currency formatting. E.g.: And: I can't work out how to do this however - I can't nest Is there a way to specify a number format in the message format? Something like: |
Beta Was this translation helpful? Give feedback.
Answered by
kazupon
May 23, 2021
Replies: 1 comment 2 replies
-
|
You can solve this using the message: {
"msg": {
"units": "You have 0 units remaining | You have 1 unit remaining | You have {unit} units remaining"
}
}usage example: $t('msg.units', 100000, { named: { unit: $n(100000) } })about |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
mjog
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can solve this using the
$tand$nAPI.message:
{ "msg": { "units": "You have 0 units remaining | You have 1 unit remaining | You have {unit} units remaining" } }usage example:
about
$tAPI details:https://vue-i18n.intlify.dev/api/injection.html#t-key-plural-options