Closed intellild closed 5 months ago
I'm having a similar problem. I think it is required to export the TS data through a wrapping adapter object like export default createI18nLangueage({your: "language_object"})
, but I fail to find how to define it.
EDIT: RTFM:
https://i18n.nuxtjs.org/docs/guide/lazy-load-translations
export default defineI18nLocale(async locale => { return { welcome: 'Bienvenue' } })
Would you be able to provide a reproduction? 🙏
@intellild I'm not sure what the issue is, the documentation you're referring to is not for Nuxt I18n
Thanks @rishta I was trying to use the feature from unplugin-vue-i18n which powers nuxt i18n and failed to find the correct documentation
Environment
Build Modules: -
Reproduction
Follow unplugin-vue-i18n's document https://github.com/intlify/bundle-tools/blob/main/packages/unplugin-vue-i18n/README.md#allowdynamic
Describe the bug
'unknown' type in 'mypath/en-US.ts'
Additional context
I read through the code
src/utils#scanProgram
and managed to get it work through a hackBut this diverges from unplugin-vue-i18n. Is it intended or a bug?
Logs
No response