vue-i18n
vue-i18n copied to clipboard
resolve global CustomBlock with $t
trafficstars
Clear and concise description of the problem
ref: https://github.com/nuxt-modules/i18n/issues/2472
Reproduction
https://stackblitz.com/edit/bobbiegoede-nuxt-i18n-starter-dgbghr?file=pages%2Findex.vue
Describe the bug
global <i18n> custom blocks seem to be ignored or excluded somehow when used with $t
Additional context
Maybe helps for debugging: by adding the following line to script setup the problem is gone
useI18n({ useScope: 'global' });
I suspect this that the custom block is only parsed when useI18n is called
Suggested solution
work-around
in global customblock
useI18n({ useScope: 'global' })
Alternative
No response
Additional context
No response
Validations
- [X] Read the Contributing Guidelines
- [X] Read the Documentation
- [X] Check that there isn't already an issue that request the same feature to avoid creating a duplicate.