-
-
Notifications
You must be signed in to change notification settings - Fork 518
Closed
Labels
Description
Environment
- Operating System: Windows_NT
- Node Version: v18.18.1
- Nuxt Version: 3.5.3
- Nitro Version: 2.5.2
- Package Manager: [email protected]
- Builder: vite
- User Config: ssr, app, runtimeConfig, alias, imports, css, build, modules, vue, vite
- Runtime Modules: @nuxtjs/[email protected], @pinia/[email protected], ()
- Build Modules: -
Reproduction
NA
Describe the bug
Hi there,
when a user enters my app some translations are loaded via a middleware from a server. I would like to use the function mergeLocaleMessage() to expand my translations with those coming from the server. However, within my middleware (*.ts) I cannot get access to i18n
const { mergeLocalMessage } = useI18n()
I get the error
Must be called at the top of a `setup` function
Any help how I could get access to i18n within a middleware would be highly appreciated
Additional context
No response
Logs
No response