\n\n### Additional context\n\n_No response_\n\n### Logs\n\n```shell\n\n```",[3209],{"name":3175,"color":3176},3820,"ERROR Cannot restart nuxt: ERROR ENOENT: no such file or directory, open 'C:\\Users\\xxx\\Desktop\\puppy\\i18n\\locales\\en-US.ts'","2025-09-15T05:58:50Z","https://github.com/nuxt-modules/i18n/issues/3820",0.6626066,{"description":3216,"labels":3217,"number":3219,"owner":3178,"repository":3179,"state":3180,"title":3220,"updated_at":3221,"url":3222,"score":3223},"### Environment\n\nnuxt: 4.1.2\n@nuxtjs/i18n: 10.1.0\n\n### Reproduction\n\ni can't create minimal reproduction now\n\n### Describe the bug\n\ni need load my locale from backend via api. \nhttps://i18n.nuxtjs.org/docs/guide/lazy-load-translations#basic-usage\nit still work in v9.5.6 but when i upgrade to v10.1.0,i don't see call api to get locale from ssr or csr on production but it still work on dev. I don't know how to fix it.\n\n### Additional context\n\n_No response_\n\n### Logs\n\n```shell\n\n```",[3218],{"name":3175,"color":3176},3823,"@nuxtjs/i18n v10.1.0: i can't load locale from backend, but it still work in v9.5.6","2025-09-17T16:26:49Z","https://github.com/nuxt-modules/i18n/issues/3823",0.66759616,{"description":3225,"labels":3226,"number":3239,"owner":3178,"repository":3179,"state":3180,"title":3240,"updated_at":3241,"url":3242,"score":3243},"### Environment\n\n•\tNuxt: 4.x\n•\t@nuxtjs/i18n: 10.x\n•\tNode.js: 20+\n•\tOS: macos\n•\tBrowser:chrome\n\n### Reproduction\n\n1.\tCreate a fresh Nuxt 4 project\n2.\tInstall @nuxtjs/i18n@^10\n3.\tMinimal nuxt.config.ts:\n```\nexport default defineNuxtConfig({\n i18n: {\n strategy: 'prefix',\n defaultLocale: 'en-US',\n locales: [\n { code: 'en-US', name: 'English' },\n { code: 'zh-CN', name: '简体中文' }\n ],\n detectBrowserLanguage: false,\n skipSettingLocaleOnNavigate: true,\n experimental: {\n preload: false,\n stripMessagesPayload: false\n }\n }\n})\n```\n4.\tRun npm run dev and open the homepage — you’ll see two logs for the same locale.\n\nCall stacks from first page load:\n\nCall 1 (App initialization)\n```\nloadMessagesFromClient (…/node_modules/@nuxtjs/i18n/dist/runtime/utils/load-messages.mjs:XX)\nloadAndSetLocale (…/node_modules/@nuxtjs/i18n/dist/runtime/utils/locale.mjs:XX)\nsetup (route-locale-detect.client.mjs:12)\napplyPlugins (…/node_modules/nuxt/dist/app/entry.mjs:XX)\ninitApp (…/node_modules/nuxt/dist/app/entry.mjs:XX)\n```\nCall 2 (Initial navigation / route normalization)\n```\nloadMessagesFromClient (…/node_modules/@nuxtjs/i18n/dist/runtime/utils/load-messages.mjs:XX)\nloadAndSetLocale (…/node_modules/@nuxtjs/i18n/dist/runtime/utils/locale.mjs:XX)\nsetup (route-locale-detect.client.mjs:13)\nrouter.replace / pushWithRedirect (…/node_modules/vue-router/dist/vue-router.mjs:XX)\n```\n\n### Describe the bug\n\nWhen using @nuxtjs/i18n v10 with Nuxt 4, loadMessagesFromClient is executed twice on the client during the first page load — once during app initialization and once again after the initial navigation normalization.\nEven with minimal config, browser language detection disabled, and skipSettingLocaleOnNavigate enabled, this still happens.\nFor runtime-loaded translations (e.g., from a remote API), the second internal load overwrites messages from the first, leading to inconsistent output.\n\n### Additional context\n\n•\tTried disabling detectBrowserLanguage and enabling skipSettingLocaleOnNavigate\n•\tNo custom route middlewares or manual setLocale calls\n•\tToggling experimental.preload had no effect\n•\tqueueMicrotask cannot guarantee correct overwrite order if local message files are large; only setTimeout(0) reliably delays after the second call, which is not ideal\n•\tLikely cause: route-locale-detect client plugin calls loadAndSetLocale both during app initialization and after initial navigation.\n•\tSuggestion: Provide an option to skip the second call in client mode, or internally cache per-locale loader results so repeated calls for the same locale return the same Promise instead of overwriting.\n\n### Logs\n\n```shell\n\n```",[3227,3230,3233,3236],{"name":3228,"color":3229},"bug 🐛","ee0701",{"name":3231,"color":3232},"performance","006b75",{"name":3234,"color":3235},"scope: dynamic resources","38FB12",{"name":3237,"color":3238},"scope: runtime","84b6eb",3773,"Messages fetched and merged twice on client initialization","2025-09-11T16:11:22Z","https://github.com/nuxt-modules/i18n/issues/3773",0.6681043,{"description":3245,"labels":3246,"number":3249,"owner":3178,"repository":3179,"state":3180,"title":3250,"updated_at":3251,"url":3252,"score":3253},"### Environment\n\n Operating System: Darwin\n- Node Version: v22.15.1\n- Nuxt Version: 4.0.1\n- CLI Version: 3.26.4\n- Nitro Version: 2.12.4\n- Package Manager: pnpm@10.11.0\n- Builder: -\n- User Config: runtimeConfig, devtools, modules, app, css, i18n, image, telemetry, sentry, storyblok, devServer, sourcemap, vite, extends, compatibilityDate\n- Runtime Modules: @nuxtjs/i18n@9.5.6, @pinia/nuxt@0.11.2, @nuxt/image@1.10.0, @nuxt/eslint@1.7.0, @nuxtjs/stylelint-module@5.2.1, @storyblok/nuxt@8.0.1, @sentry/nuxt/module@9.40.0\n\n\n### Reproduction\n\nhttps://codesandbox.io/p/devbox/dry-violet-pg2j9q\n\nadd en-GB.json \n```\n{\n \"header\": {\n \"apply-as-developer\": \"Apply as a developer\",\n \"find-developer\": \"FIND A DEVELOPER\",\n \"sign-in\": \"LOG IN\"\n }\n}\n```\n\nadd empty sv-SE.json - `{}`\n\nnuxt configs\n\n```\n i18n: {\n baseUrl: process.env.BASE_URL,\n strategy: 'prefix_and_default',\n defaultLocale: 'en',\n detectBrowserLanguage: false,\n compilation: {\n strictMessage: false,\n escapeHtml: false,\n },\n vueI18n: '../i18n/i18n.config.ts',\n locales: [\n {\n code: 'en',\n language: 'en-GB',\n name: 'English',\n file: 'en-GB.json',\n isCatchallLocale: true,\n },\n {\n code: 'sv',\n language: 'sv-SE',\n name: 'Svenska',\n file: 'sv-SE.json',\n },\n ]\n}\n```\n\ni18n.config.ts\n```\nexport default defineI18nConfig(() => ({\n locale: 'en',\n fallbackLocale: 'en',\n fallbackRoot: true,\n fallbackRootWithEmptyString: true,\n}));\n```\n\n\n\n\n### Describe the bug\n\nOn my new nuxt v4 project the fallbacks didn't work and I was getting the following errors\n```\nHeader.vue:43 [intlify] Not found 'header.find-developer' key in 'sv' locale messages.\nHeader.vue:43 [intlify] Fall back to translate 'header.find-developer' key with 'en' locale. \nHeader.vue:43 [intlify] Not found 'header.find-developer' key in 'en' locale\n```\nalthough I had translations on english.\n\nI changed package version to to - \"@nuxtjs/i18n\": \"^9.5.4\" and it is working like a charm again.\n\n### Additional context\n\n_No response_\n\n### Logs\n\n```shell\n\n```",[3247,3248],{"name":3175,"color":3176},{"name":3199,"color":3200},3760,"Fallback language does not work on v10.0.2","2025-07-25T12:56:26Z","https://github.com/nuxt-modules/i18n/issues/3760",0.67073804,{"description":3255,"labels":3256,"number":3258,"owner":3178,"repository":3179,"state":3180,"title":3259,"updated_at":3260,"url":3261,"score":3262},"### Environment\n\n- Operating System: `Darwin`\n- Node Version: `v22.18.0`\n- Nuxt Version: `4.1.2`\n- CLI Version: `3.28.0`\n- Nitro Version: `2.12.6`\n- Package Manager: `npm@10.9.3`\n- Builder: `-`\n- User Config: `compatibilityDate`, `devtools`, `modules`, `i18n`\n- Runtime Modules: `@nuxtjs/i18n@10.1.0`, `@nuxt/test-utils/module@3.19.2`\n- Build Modules: `-`\n\n\n### Reproduction\n\n- Install and setup I18n module\n- Add Nuxt testing\n- Use a component with translation (`const {.t } = useI18n();`) in the `setup` part of the component\n\nThe error case is set up in this repository, after cloning and installing dependencies the test run shows the error.\n\nhttps://github.com/gaborsoos-byborg/nuxt-i18n-testing\n\n### Describe the bug\n\nWhen testing a component in Vitest with NuxtTestUtils, translating a string with `$t` works fine, but translating with `const { t } = useI18n();` fails with the following error\n\n```\nstderr | ../test/components/Content.test.ts > Content > should render\n[Vue warn]: Unhandled error during execution of setup function \n at \u003CMountSuspendedComponent > \n at \u003CMountSuspendedHelper> \n at \u003CAnonymous ref=\"VTU_COMPONENT\" > \n at \u003CVTUROOT>\n \nSyntaxError: Need to install with `app.use` function\n ❯ createCompileError ../node_modules/@intlify/message-compiler/dist/message-compiler.mjs:77:19\n 75| ? format((messages || errorMessages)[code] || '', ...(args || []))\n 76| : code;\n 77| const error = new SyntaxError(String(msg));\n | ^\n 78| error.code = code;\n 79| if (loc) {\n ❯ createI18nError ../node_modules/vue-i18n/dist/vue-i18n.mjs:61:12\n ❯ useI18n ../node_modules/vue-i18n/dist/vue-i18n.mjs:2143:15\n ❯ setup components/Content.vue:2:15\n ❯ wrappedSetup ../node_modules/@nuxt/test-utils/dist/runtime-utils/index.mjs:99:28\n ❯ clonedComponent.setup ../node_modules/@nuxt/test-utils/dist/runtime-utils/index.mjs:190:48\n ❯ callWithErrorHandling ../node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:200:19\n ❯ setupStatefulComponent ../node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:7936:25\n ❯ setupComponent ../node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:7897:36\n ❯ mountComponent ../node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:5227:7\n```\n\n### Additional context\n\n_No response_\n\n### Logs\n\n```shell\n\n```",[3257],{"name":3175,"color":3176},3827,"Test fails when using translation outside of template","2025-09-23T09:46:41Z","https://github.com/nuxt-modules/i18n/issues/3827",0.6731137,{"description":3264,"labels":3265,"number":3269,"owner":3178,"repository":3179,"state":3270,"title":3271,"updated_at":3272,"url":3273,"score":3274},"### Environment\n\n- Operating System: Windows_NT\n- Node Version: v22.14.0\n- Nuxt Version: 3.16.2\n- CLI Version: 3.24.1\n- Nitro Version: 2.11.8\n- Package Manager: yarn@1.22.22\n- Builder: -\n- User Config: devtools, app, modules, css, build, i18n, site, compatibilityDate\n- Runtime Modules: @nuxtjs/tailwindcss@6.13.2, @nuxt/image@1.9.0, @nuxtjs/i18n@9.5.3, @hypernym/nuxt-anime@2.1.1, @nuxtjs/sitemap@7.2.10, @nuxtjs/robots@5.2.9 \n- Build Modules: -\n\n### Reproduction\n\nhttps://stackblitz.com/edit/bobbiegoede-nuxt-i18n-starter-yr15sl4p?file=locales%2Fen%2Findex.ts\n\n### Describe the bug\n\nI’m trying to auto-import all `.json` files in a ` locales/[lang]/` folder using `import.meta.glob` in each language’s `index.ts` file. This worked fine in Nuxt 2 using `require.context`, but in Nuxt 3 with` @nuxtjs/i18n`, I’m encountering the following error:\n\n`[plugin:vite:esbuild] Failed locale loading: 'unknown' type in **locales/ar/index.ts`**\n\n\n### Additional context\n\nWhat I’m Trying to Do\n```\n// locales/ar/index.ts\nconst modules = import.meta.glob('./**/*.json', { eager: true })\n\nconst messages: Record\u003Cstring, any> = {}\n\nfor (const path in modules) {\n const key = path\n .replace('./', '')\n .replace('.json', '')\n .replace(/\\//g, '.')\n messages[key] = modules[path].default\n}\n\nexport default messages\n```\n```\n// nuxt.config.ts\ni18n: {\n strategy: 'prefix_except_default',\n defaultLocale: 'ar',\n lazy: true,\n langDir: 'locales',\n locales: [\n { code: 'ar', name: 'Arabic', file: 'ar/index.ts' },\n { code: 'en', name: 'English', file: 'en/index.ts' }\n ]\n}\n```\n\nI expected Nuxt to allow ` import.meta.glob` usage in language-specific ` index.ts` files to auto-import and combine all locale messages from nested JSON files.\n\n**What Happened Instead**\n\nDynamic path template literals are not supported by Vite\n\nEven static `../locales/ar/**/*.json` fails due to path resolution issues\n\nErrors like `unknown type` or `Failed locale loading` appear\n\n\n**Workarounds Tried**\nUsing `require.context` – unsupported in Vite\n\nSwitching to manual static imports – works but violates DRY and doesn't scale\n\nMoving the glob loader to a utility file – still fails due to unresolved paths\n\nReplacing `lodash.set` with custom merging logic – no difference in behavior\n\nChecked paths, JSON validity, eager option – no effect\n\n### Logs\n\n```shell\n\n```",[3266],{"name":3267,"color":3268},"need more info","e295d6",3536,"closed","Failed locale loading with static JSON imports in Nuxt 3","2025-05-23T10:27:57Z","https://github.com/nuxt-modules/i18n/issues/3536",0.60232115,{"description":3276,"labels":3277,"number":3284,"owner":3178,"repository":3179,"state":3270,"title":3285,"updated_at":3286,"url":3287,"score":3288},"### Environment\n\n- Nuxt version: 3.17.4\n- @nuxtjs/i18n version: 10.0.0-beta-7\n- Deployment target: Static site (nuxi generate)\n- Works fine in SSR build (nuxi build)\n- Node version: 22\n\n### Reproduction\n\nhttps://codesandbox.io/p/devbox/prod-https-6gz2f5\n\n- run `pnpm generate` command and check output folder. there is no i18n folder. \n- run `pnpm start` to run generate build. open browser console. you'll see `Failed to load messages for locale en FetchError: [GET] \"/_i18n/en/messages.json\":`\n\n### Describe the bug\n\nWhen generating a static site using `nuxi generate`, I get the following error in the console when loading the site:\n```\nFailed to load messages for locale en FetchError: [GET] \"/_i18n/en/messages.json\": 404 Not Found\n```\n\nThe same Nuxt app works fine with nuxtjs/i18n v9\n\nSetting `ssr: true` works fine for both build & generate \n\n### Additional context\n\nHere’s part of my nuxt.config.ts:\n```\n{\n defaultLocale: 'en',\n debug: import.meta.env.DEV,\n locales: [\n {\n code: 'en',\n language: 'en-US',\n file: 'en.json',\n name: 'English',\n },\n {\n code: 'es',\n file: 'es.json',\n name: 'Spanish',\n },\n {\n code: 'tl',\n file: 'tl.json',\n name: 'Tagalog (Filipino)',\n },\n ],\n strategy: 'no_prefix',\n detectBrowserLanguage: {\n useCookie: true,\n cookieKey: 'dmc.locale',\n redirectOn: 'root',\n },\n}\n```\n\n### Logs\n\n```shell\nTkPgtAp_.js:9 Failed to load messages for locale en FetchError: [GET] \"/_i18n/en/messages.json\": 404 Not Found\n at async s (N_fP37pm.js:19:23784)\n at async Object.loadLocaleMessages (N_fP37pm.js:53:9792)\n at async B1 (N_fP37pm.js:53:11552)\n at async setup (N_fP37pm.js:67:48664)\n at async t$ (N_fP37pm.js:19:30748)\n at async i (N_fP37pm.js:19:31273)\n at async N_fP37pm.js:19:31213\n at async Promise.all (:8080/index 5)\n at async N_fP37pm.js:19:31122\n at async i (N_fP37pm.js:19:31273)\n at async n$ (N_fP37pm.js:19:31324)\n at async Qk (N_fP37pm.js:1100:1993)\n```",[3278,3281],{"name":3279,"color":3280},"scope: ssg","85eac7",{"name":3282,"color":3283},"scope: ssr","0052cc",3645,"Failed to load messages for locale only in static site generated with nuxi generate (404 on /_i18n/en/messages.json)","2025-05-26T18:06:23Z","https://github.com/nuxt-modules/i18n/issues/3645",0.62676156,["Reactive",3290],{},["Set"],["ShallowReactive",3293],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$f-GE7y9nQo5a_70nAhhkP0N5k_ToZ5E5WoxZyOLdcFTk":-1},"/nuxt-modules/i18n/3560"]