Number localization with Custom formatting not working
See original GitHub issuevue & vue-i18n version
ex: 2.6.12, 8.22.4
I copied this example from the docs and can’t compile it. MyComponent.vue content:
<template>
<i18n-n :value="100" format="currency">
<span v-slot:integer="slotProps">{{ slotProps.integer }}</span>
</i18n-n>
</template>
https://kazupon.github.io/vue-i18n/guide/number.html
Is this a bug or do I miss something?
Errors compiling template:
v-slot can only be used on components or <template>.
1 |
2 | <i18n-n :value="100" format="currency">
3 | <span v-slot:integer="slotProps">{{ slotProps.integer }}</span>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
4 | </i18n-n>
5 |
Issue Analytics
- State:
- Created 3 years ago
- Comments:12 (7 by maintainers)
Top Results From Across the Web
Internationalization(Number formatting "num.toLocaleString ...
The toLocaleString() method is by definition implementation-dependent: it uses the implementation locale, such as browser locale.
Read more >German Localization issue on number format with excel chart
This is working fine when the sheet2 is active. If sheet1 is active where chart is present then this localization is not applying...
Read more >A Concise Guide to Number Localization | Phrase
NumberFormat object for formatting localized numbers, optionally as currencies or percentages. C'est Fini. We hope you enjoyed this brief guide ...
Read more >Number.prototype.toLocaleString() - JavaScript | MDN
Using toLocaleString() In basic use without specifying a locale, a formatted string in the default locale and with default options is returned.
Read more >Localizing number formatting | Looker - Google Cloud
Manage localized number formatting in Looker.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You have to put it inside the vuei18n object within the nuxt-i18n configuration.
Something like this should be a proper example: