\n\n### Describe the bug\n\nWith the default settings and `experimental.typedPages: true` the generated types are not correctly picked up.\n\nIf I rename `RouteNamedMapI18n` to `RouteNamedMap` the types are available.\n\n### Additional context\n\n_No response_\n\n### Logs\n\n```shell\n\n```",[3220],{"name":3198,"color":3199},3771,"useRoute needs suffix to work","2025-08-05T16:28:06Z","https://github.com/nuxt-modules/i18n/issues/3771",0.6658582,{"description":3227,"labels":3228,"number":3230,"owner":3187,"repository":3188,"state":3189,"title":3231,"updated_at":3232,"url":3233,"score":3234},"### Environment\n\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, ssr, i18n\n- Runtime Modules: @nuxtjs/i18n@10.1.0\n- Build Modules: -\n```\n\n### Reproduction\n\nhttps://github.com/invoxiagau/nuxt-18-detectBrowserLanguage\n\n- Run the production `cloud-build` and `cloud-run` scripts (check README), the bug is only occurring when serving static files\n- Set your browser default language as french\n\n### Describe the bug\n\n- Visit `localhost:8080`\n- I18n correctly detects the browser default language and redirects to `/fr`\n- You can see a list of links using different methods to localise links such as `NuxtLinkLocale`, `NuxtLink`+ `localePath`\n- The content is getting translated in french\n- But, the links are not getting updated:\n \nI expect: `/fr/generic-page`\nInstead I get: `/generic-page`\n\nI get the following error in my console:\n```Hydration completed but contains mismatches.```\n\n### Additional context\n\nI'm unable to reproduce this issue with the dev server, only after building and serving the static files using a http web server, in my case nginx.\n\n\n### Logs\n\n```shell\nHydration completed but contains mismatches.\n```",[3229],{"name":3198,"color":3199},3828,"localePath / NuxtLinkLocale hydration mismatches after browserRedirection with http web server","2025-09-29T08:39:16Z","https://github.com/nuxt-modules/i18n/issues/3828",0.6664484,{"description":3236,"labels":3237,"number":3242,"owner":3187,"repository":3188,"state":3243,"title":3244,"updated_at":3245,"url":3246,"score":3247},"### Environment\n\n- Operating System: `Darwin`\n- Node Version: `v22.14.0`\n- Nuxt Version: `4.0.1`\n- CLI Version: `3.26.4`\n- Nitro Version: `2.12.4`\n- Package Manager: `pnpm@10.12.4`\n- Builder: `-`\n- User Config: `compatibilityDate`, `devtools`, `modules`, `i18n`\n- Runtime Modules: `@nuxt/scripts@0.11.10`, `@nuxt/test-utils@3.19.2`, `@nuxtjs/i18n@10.0.2`\n- Build Modules: `-`\n\n\n### Reproduction\n\n修改多语言热更新报错,\n\n\u003Cimg width=\"3318\" height=\"334\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/ba25f21a-3216-4066-9e49-269efad06425\" />\n\n\u003Cimg width=\"1436\" height=\"474\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/378d9d5d-c5ae-48e5-a3b5-da94d168e206\" />\n\n### Describe the bug\n\n修改多语言热更新报错,\n\n\u003Cimg width=\"3318\" height=\"334\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/ba25f21a-3216-4066-9e49-269efad06425\" />\n\n\u003Cimg width=\"1436\" height=\"474\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/378d9d5d-c5ae-48e5-a3b5-da94d168e206\" />\n\n### Additional context\n\n_No response_\n\n### Logs\n\n```shell\n\n```",[3238,3241],{"name":3239,"color":3240},"upstream","fbca04",{"name":3201,"color":3202},3753,"closed","在 nuxt4.0.2 里使用 \"@nuxtjs/i18n\": \"^10.0.2\" 热更新报错","2025-07-24T09:13:52Z","https://github.com/nuxt-modules/i18n/issues/3753",0.62592864,{"description":3249,"labels":3250,"number":3252,"owner":3187,"repository":3188,"state":3243,"title":3253,"updated_at":3254,"url":3255,"score":3256},"### Environment\n\nOperating System: Linux\nNode Version: v22.11.0\n\"dependencies\": {\n \"@element-plus/icons-vue\": \"^2.3.1\",\n \"@nuxtjs/i18n\": \"^9.5.3\",\n \"@pinia/nuxt\": \"^0.10.1\",\n \"nuxt\": \"^3.16.2\",\n \"pinia\": \"^3.0.1\",\n \"vue\": \"^3.5.13\",\n \"vue-router\": \"^4.5.0\"\n },\n \"devDependencies\": {\n \"@antfu/eslint-config\": \"^4.11.0\",\n \"@element-plus/nuxt\": \"^1.1.1\",\n \"element-plus\": \"^2.9.7\",\n \"eslint\": \"^9.24.0\",\n \"sass\": \"^1.86.3\",\n \"sass-embedded\": \"^1.86.3\",\n \"typescript\": \"^5.8.3\"\n }\n\n### Reproduction\n\n低版本没有这个问题,打印值,服务端一次,客户端一次\n\n\n此次版本:\n\"nuxt\": \"^3.16.2\",\n\"@nuxtjs/i18n\": \"^9.5.3\",\n\n\n目录结构:根目录下 i18n -> locales -> locale.ts\nnuxt.config.ts文件\n\nmodules: [\n '@element-plus/nuxt',\n '@nuxtjs/i18n',\n ],\n i18n: {\n /* 较新版本的 @nuxtjs/i18n 模块中出现警告, 特别是与nuxt3.16.x一起使用 \n * bundle.optimizeTranslationDirective is enabled by default, we recommend disabling this feature as it causes issues and will be deprecated in v10.\n * bundle.optimizeTranslationDirective 功能在未来的 v10 版本中将被弃用,并且开发团队建议禁用它,因为它可能导致问题。\n * 明确设置此选项后,警告会消失,并且应用程序将更好地适应未来的 i18n 模块更新。\n * 如添加之后,警告未消失 1. 比对版本是否兼容 2. 缓存问题,nuxt使用了旧的缓存配置 npx nuxi cleanup\n */\n bundle: {\n optimizeTranslationDirective: false // 明确禁用此功能\n },\n // Module Options\n strategy: 'no_prefix', // 不为路由添加区域前缀\n defaultLocale: 'en', // 默认语种\n detectBrowserLanguage: false, // 禁用浏览器语言检测功能\n lazy: true,\n locales: [\n {\n code: 'en',\n file: 'locale.ts',\n },\n ],\n compilation: {\n strictMessage: false, // 允许message中包含html\n },\n },\n\n### Describe the bug\n\nexport default defineI18nLocale(async (locale) => {\n console.log(locale)\n})\n打印出来,打印了4次,服务端2次,客户端2次\n \n\n\n### Additional context\n\n_No response_\n\n### Logs\n\n```shell\n\n```",[3251],{"name":3181,"color":3182},3538,"defineI18nLocale Repeated call problem, Server twice, client twice","2025-06-29T18:38:45Z","https://github.com/nuxt-modules/i18n/issues/3538",0.6329652,{"description":3258,"labels":3259,"number":3262,"owner":3187,"repository":3188,"state":3243,"title":3263,"updated_at":3264,"url":3265,"score":3266},"### Environment\n\n``` \n- Operating System: Darwin\n- Node Version: v22.16.0\n- Nuxt Version: 4.0.3\n- CLI Version: 3.28.0\n- Nitro Version: 2.12.4\n- Package Manager: npm@10.9.2\n- Builder: -\n- User Config: compatibilityDate, devtools, modules, css, vite, routeRules, i18n, sanctum, runtimeConfig, uiPro\n- Runtime Modules: @nuxt/eslint@1.8.0, @nuxt/image@1.11.0, @nuxt/scripts@0.11.10, @nuxt/ui-pro@3.3.2, @nuxtjs/i18n@10.0.5, nuxt-auth-sanctum@1.1.2, dayjs-nuxt@2.1.11\n- Build Modules: -\n```\n\n### Reproduction\n\n1. Create translation files in the default location:\n```\ni18n/locales/es.ts\ni18n/locales/en.ts\n```\n\n2. Configure nuxt.config.ts:\n```ts\nrouteRules: {\n \"/\": { prerender: true },\n \"/en\": { prerender: true },\n...\n// We have prerender y routes, because are landings and astatic\n},\n i18n: {\n defaultLocale: \"es\",\n strategy: \"prefix_except_default\",\n baseUrl: process.env.NUXT_PUBLIC_FRONTEND_URL,\n locales: [\n { code: \"en\", name: \"English\", file: \"en.ts\", language: \"en\" },\n { code: \"es\", name: \"Español\", file: \"es.ts\", language: \"es\" },\n ],\n}\n```\n\n3. layouts/default.vue\n```vue\n\u003Cscript lang=\"ts\" setup>\nconst i18nHead = useLocaleHead({\n dir: true,\n seo: true,\n});\nconst { t } = useI18n();\nconst route = useRoute();\nconst config = useRuntimeConfig();\nconst { locale } = useI18n();\nconst title = computed(() =>\n t((route.meta.title as string) ?? \"layout.default.title\", {\n appName: config.public.appName,\n })\n);\ntype Meta = {\n property?: string;\n content: string;\n name?: string;\n};\nconst metaTags = computed\u003CMeta[]>(() => {\n const description = t(\n (route.meta.description as string) ?? \"layout.default.description\"\n );\n\n return [\n ...(i18nHead.value.meta || []),\n {\n name: \"description\",\n content: description,\n },\n {\n property: \"og:title\",\n content: title.value,\n },\n {\n property: \"og:description\",\n content: description,\n },\n {\n property: \"og:image\",\n content: `/media/common/${locale.value}/og.webp`,\n },\n {\n property: \"og:url\",\n content: `${config.public.frontendUrl}${route.fullPath}`,\n },\n {\n property: \"og:locale\",\n content: i18nHead.value.htmlAttrs.lang,\n },\n {\n property: \"og:site_name\",\n content: config.public.appName as string,\n },\n {\n property: \"og:type\",\n content: \"website\",\n },\n {\n name: \"twitter:card\",\n content: \"summary_large_image\",\n },\n {\n name: \"twitter:title\",\n content: title.value,\n },\n {\n name: \"twitter:description\",\n content: description,\n },\n {\n name: \"twitter:image\",\n content: `/media/common/${locale.value}/og.webp`,\n },\n {\n name: \"robots\",\n // Only if we are in production\n content:\n config.public.vercelEnv == \"production\"\n ? \"index, follow\"\n : \"noindex, nofollow\",\n },\n ] as Meta[];\n});\n\nconst links = computed(() => [\n ...(i18nHead.value.link || []),\n { rel: \"icon\", type: \"image/x-icon\", href: \"/favicon.ico\" },\n]);\n\u003C/script>\n\n\u003Ctemplate>\n \u003CHtml :lang=\"i18nHead.htmlAttrs.lang\" :dir=\"i18nHead.htmlAttrs.dir\">\n \u003CHead>\n \u003CTitle>{{ title }}\u003C/Title>\n \u003Ctemplate v-for=\"link in links\" :key=\"link.id\">\n \u003CLink\n :id=\"link.id\"\n :rel=\"link.rel\"\n :href=\"link.href\"\n :hreflang=\"link.hreflang\"\n />\n \u003C/template>\n \u003Ctemplate v-for=\"meta in metaTags\" :key=\"meta.id\">\n \u003CMeta\n :property=\"meta.property\"\n :content=\"meta.content\"\n :name=\"meta.name\"\n />\n \u003C/template>\n \u003C/Head>\n \u003CBody>\n \u003CAppHeader />\n \u003Cslot />\n \u003CAppFooter />\n \u003C/Body>\n \u003C/Html>\n\u003C/template>\n\n\u003Cstyle>\u003C/style>\n```\n\n4. Some page\n```vue\ndefinePageMeta({\n layout: \"default\",\n title: \"essay.meta.title\",\n description: \"essay.meta.description\",\n});\n```\n\n5. Example of translation file:\n```\nexport default {\n appHeader: {\n tools: \"Herramientas\",\n summary: {\n title: \"Resumidor\",\n description: \"Resume textos de forma automática.\",\n },\n....\n```\n\n\n\n### Describe the bug\n\nWhen using the current Nuxt i18n setup (translations inside i18n/locales/es.ts, i18n/locales/en.ts, etc.), translation keys appear in the \u003Chead> instead of resolved translations.\n\nFor example, Google is indexing essay.meta.title instead of the translated string because the SSR HTML is rendered before locale messages are available. The client later fetches /_i18n/es/messages.json, but if that request fails or is delayed, the \u003Ctitle> and \u003Cmeta> remain as raw keys. This is problematic for SEO since crawlers usually index the raw SSR HTML.\n\nWhen inspect with search console:\n\u003Cimg width=\"399\" height=\"76\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/9b9fcc11-0244-4eab-a624-1e60ac29d6e3\" />\n\u003Cimg width=\"400\" height=\"223\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/3f70c9a6-ec7e-4a20-9ec1-16dc62958297\" />\nIn google SERP\n\u003Cimg width=\"705\" height=\"151\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/ea3e3b89-9bcf-421d-96cc-5987aff8a64c\" />\n\n### Additional context\n\n#### Documentation issues\n\nIn older versions there was a lazy: true/false option. This no longer exists, but the migration path is unclear.\n\nIt’s not documented whether .ts files (with export default {}) behave the same as .json for SSR vs client-only loading.\n\nThe docs show how to use file/files, but don’t explain how to guarantee SSR has messages ready for SEO-critical content like \u003Chead>.\n\nRight now it’s unclear if the messages are truly lazy-loaded, or if something else prevents them from being available at SSR.\n\n### Logs\n\n```shell\n\n```",[3260,3261],{"name":3198,"color":3199},{"name":3201,"color":3202},3794,"SEO issue with SSR translations and unclear lazy-loading behavior","2025-10-07T14:52:13Z","https://github.com/nuxt-modules/i18n/issues/3794",0.63375837,{"description":3268,"labels":3269,"number":3272,"owner":3187,"repository":3188,"state":3243,"title":3273,"updated_at":3274,"url":3275,"score":3276},"### Environment\n\n- Operating System: Darwin\n- Node Version: v22.17.1\n- Nuxt Version: 4.1.0\n- CLI Version: 3.28.0\n- Nitro Version: 2.12.5\n- Package Manager: pnpm@10.13.1\n- Builder: -\n- User Config: compatibilityDate, devtools, modules, i18n, ssr\n- Runtime Modules: @nuxtjs/i18n@10.0.6\n- Build Modules: -\n\n### Reproduction\n\n`\u003Cremoved link to zip file>`\n\n### Describe the bug\n\n执行 `pnpm generate` \n[intlify] Not found 'welcome' key in 'en' locale messages. \n\n\u003Cimg width=\"835\" height=\"546\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/caf8e9e8-ce41-4789-a6e4-478d2a55c24d\" />\n\n### Additional context\n\n_No response_\n\n### Logs\n\n```shell\n\n```",[3270,3271],{"name":3198,"color":3199},{"name":3201,"color":3202},3807,"静态生成时,.output下 locales语言文件是空的","2025-09-05T01:23:11Z","https://github.com/nuxt-modules/i18n/issues/3807",0.6388038,{"description":3278,"labels":3279,"number":3286,"owner":3187,"repository":3188,"state":3243,"title":3287,"updated_at":3288,"url":3289,"score":3290},"### 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```",[3280,3283],{"name":3281,"color":3282},"scope: ssg","85eac7",{"name":3284,"color":3285},"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.6489863,["Reactive",3292],{},["Set"],["ShallowReactive",3295],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fglSVuR5JywzvII36cUSMPEUGHUQ4x5jDn9dbd3eHk5A":-1},"/nuxt-modules/i18n/3813"]