|\u003Cimg width=\"324\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/cd6f6927-33b3-4b85-a984-64c6cb1f53e5\" />|\n\n#### Proposed Feature: `localeDetector` Option\n\n##### Current Behavior Example\n\nTo illustrate the current behavior, consider the following scenario:\n\n* Accessing `/en/about` and `/ja/about` under the `no_prefix` strategy will not trigger locale detection based on the pathname.\n* As a result, both paths will use the language setting of the build machine during SSG, resulting in both paths potentially being generated in the same language.\n\nScreenshots and repository links demonstrating the current behavior will be provided to further clarify the issue.\n\nTo address this issue, I propose adding a new `localeDetector` option to the module configuration. This option allows specifying the methods for locale detection as follows:\n\n```typescript\ntype LocaleDetector = (\"pathname\" | \"domain\" | \"cookie\" | \"browser\")[];\n\nconst localeDetector: LocaleDetector = [\"pathname\", \"domain\", \"cookie\", \"browser\"];\n```\n\nIf `pathname` is specified, the locale will be automatically detected based on the URL pathname.\n\nThe default value of `localeDetector` will vary depending on the `strategy` value to maintain backward compatibility. For instance, when `no_prefix` is selected, the default value would be:\n\n```javascript\nlocaleDetector: [\"domain\", \"cookie\", \"browser\"]\n```\n\n##### Example Configuration for My Use Case:\n\n```javascript\nstrategy: \"no_prefix\",\nlocaleDetector: [\"pathname\", \"cookie\", \"browser\"]\n```\n\nThis configuration would resolve the issue by enabling locale detection based on pathname while maintaining backward compatibility with existing behavior.\n\nThank you for considering this feature request. I would be happy to provide further clarifications or contribute to the implementation if needed.\n\n\n### Additional information\n\n- [x] Would you be willing to help implement this feature?\n- [ ] Could this feature be implemented as a module?\n\n### Final checks\n\n- [x] Read the [contribution guide](https://nuxt.com/docs/community/contribution) (The contribution guideline of nuxt-modules/i18n is compliant with Nuxt too).\n- [x] Check existing [discussions](https://github.com/nuxt-modules/i18n/discussions) and [issues](https://github.com/nuxt/nuxt/issues).",[3052],{"name":3020,"color":3021},3609,"Add `localeDetector` option to customize locale detection during Vue component rendering","2025-05-16T18:51:35Z","https://github.com/nuxt-modules/i18n/issues/3609",0.70191824,{"description":3059,"labels":3060,"number":3062,"owner":3023,"repository":3024,"state":3025,"title":3063,"updated_at":3064,"url":3065,"score":3066},"### Environment\n\n- Operating System: `Darwin`\n- Node Version: `v22.14.0`\n- Nuxt Version: `3.17.6`\n- CLI Version: `3.25.1`\n- Nitro Version: `2.11.13`\n- Package Manager: `npm@10.9.2`\n- Builder: `-`\n- User Config: `compatibilityDate`, `devtools`, `modules`, `i18n`\n- Runtime Modules: `@nuxtjs/i18n@9.5.6`\n- Build Modules: `-`\n\n\n### Reproduction\n\n[https://github.com/ap-arto/define-i18n-route-issue](https://github.com/ap-arto/define-i18n-route-issue)\n \n1. Run the development server:`npm run dev`\n2. Visit localhost:3000\n3. Observe that the `spanish___es` route has been created, even though this domain is meant to serve only the `en` locale and the `/spanish` page shouldn't be available.\n\n### Describe the bug\n\nWhen using customRoutes: 'config' with manually specified pages, everything works as expected. However, defineI18nRoute appears to be broken in this edge case.\n\n### Additional context\n\nThis might be related to that issue: https://github.com/nuxt-modules/i18n/issues/3226\n\n### Logs\n\n```shell\n\n```",[3061],{"name":3020,"color":3021},3721,"defineI18nRoute includes routes for other locales when using 'no_prefix' and differentDomains","2025-07-11T09:46:02Z","https://github.com/nuxt-modules/i18n/issues/3721",0.70208687,{"description":3068,"labels":3069,"number":3074,"owner":3023,"repository":3024,"state":3025,"title":3075,"updated_at":3076,"url":3077,"score":3078},"### Environment\n\nI am using @nuxtjs/i18n 9.5.4 with nuxt 3.17.3 for a statically generated website.\n\n\n### Reproduction\n\n-\n\n### Describe the bug\n\n\nIn nuxt.config.ts I have the default i18n settings:\n\n```\n\t\tdetectBrowserLanguage: {\n\t\t\tuseCookie: true,\n\t\t\tcookieKey: 'i18n_redirected',\n\t\t\tredirectOn: 'root'\n\t\t},\n```\n\nThe first time the site loads, before the i18n_redirected cookie exists, I see the following error in the console:\n\n```\nHydration completed but contains mismatches.\n```\n\nSubsequent visits to the site, once the cookie exists, do not have this error.\n\nI have confirmed that i18n locale detection is the issue by testing this configuration:\n\n```\n\t\tdetectBrowserLanguage: false\n```\n\nWhen detectBrowserLanguage is false, the issue does not occur.\n\nEDIT: Upon some further testing, the error only seems to occur if the browser locale that i18n matches is different from the defaultLocale. For example, if my browser locale is \"de\" but the i18n defaultLocale is \"en\" then the error will occur when i18n flips over to to the 'de' pages. By comparision, if the browser locale is \"en\", same as i18n defaultLocale, then the error will never occur. \n\nThe site renders fine, so it is not a big deal. But I'm wondering if there is anything that can be done to prevent that error from happening in the console on the initial load, before the cookie exists?\n\nThanks (in advance) for your help!\n\n\n### Additional context\n\n_No response_\n\n### Logs\n\n```shell\n\n```",[3070,3071],{"name":3020,"color":3021},{"name":3072,"color":3073},"need reproduction 💻","CD234A",3608,"Hydration mismatch on initial static site load, before i18n cookie is set","2025-05-21T00:33:31Z","https://github.com/nuxt-modules/i18n/issues/3608",0.71048695,{"description":3080,"labels":3081,"number":3083,"owner":3023,"repository":3024,"state":3025,"title":3084,"updated_at":3085,"url":3086,"score":3087},"### Describe the feature\n\nCurrently, the files property in the locales configuration only supports an array of file paths. I would like to propose supporting a prefix option for each file to namespace its translations when loaded.\n```\ni18n: {\n locales: [\n {\n code: \"en\",\n name: \"English\",\n files: [\n { path: \"en/common.json\", prefix: \"common\" },\n { path: \"en/checkout.json\", prefix: \"checkout\" },\n { path: \"en/order.json\", prefix: \"order\" }\n ]\n }\n ]\n}\n```\nWith this configuration, the keys inside en/checkout.json would be accessible via t('checkout.key'), while en/common.json would be t('common.key'), and so on.\n\n### Additional information\n\n- [ ] Would you be willing to help implement this feature?\n- [ ] Could this feature be implemented as a module?\n\n### Final checks\n\n- [x] Read the [contribution guide](https://nuxt.com/docs/community/contribution) (The contribution guideline of nuxt-modules/i18n is compliant with Nuxt too).\n- [x] Check existing [discussions](https://github.com/nuxt-modules/i18n/discussions) and [issues](https://github.com/nuxt/nuxt/issues).",[3082],{"name":3020,"color":3021},3593,"Support for file prefix in locales.files config","2025-05-11T07:15:31Z","https://github.com/nuxt-modules/i18n/issues/3593",0.71790373,{"description":3089,"labels":3090,"number":3097,"owner":3023,"repository":3024,"state":3098,"title":3099,"updated_at":3100,"url":3101,"score":3102},"### Describe the feature\n\nI am not sure if this is already possible, but I can not seem to figure it out.\r\nFor my site I am using differentDomains: true\r\nFor SEO purposes, I would like the baseURL to change whenever I switch local (or domain) which it does not seem to be doing right now.\r\nI am using the SEO module and for that to work properly I need to set up [the site config](https://nuxtseo.com/site-config/integrations/i18n).\r\n\r\nThe site link will be automatically set to the baseURL of the i18n module.\r\n\r\nI am also not sure if this is i18n module or seo module issue.\n\n### Additional information\n\n- [ ] Would you be willing to help implement this feature?\n- [ ] Could this feature be implemented as a module?\n\n### Final checks\n\n- [X] Read the [contribution guide](https://nuxt.com/docs/community/contribution) (The contribution guideline of nuxt-modules/i18n is compliant with Nuxt too).\n- [X] Check existing [discussions](https://github.com/nuxt-modules/i18n/discussions) and [issues](https://github.com/nuxt/nuxt/issues).",[3091,3092,3095],{"name":3034,"color":3035},{"name":3093,"color":3094},"need more info","e295d6",{"name":3096,"color":3073},"need reproduction",3053,"closed","Change BaseURL when using different domains","2025-06-03T21:57:39Z","https://github.com/nuxt-modules/i18n/issues/3053",0.642756,{"description":3104,"labels":3105,"number":3107,"owner":3023,"repository":3024,"state":3098,"title":3108,"updated_at":3109,"url":3110,"score":3111},"### Describe the feature\n\nIt took me hours of fiddling around, to find out that in order to setup language fallback (in case of missing translation in the current language), I have to create `frontend/i18n/i18n.config.ts` with the following content:\n```\nexport default defineI18nConfig(() => {\n return {\n fallbackLocale: 'en-US',\n }\n})\n```\nNote that AI tools usually suggest adding configuration entries in `nuxt.config.ts`, and usually these fields are deprecated fields. My AI tools got lost completely while trying to resolve this.\nI believe this is a crucial information for implementers. Please add it to the project's guide.\n\n### Additional information\n\n- [ ] Would you be willing to help implement this feature?\n- [ ] Could this feature be implemented as a module?\n\n### Final checks\n\n- [x] Read the [contribution guide](https://nuxt.com/docs/community/contribution) (The contribution guideline of nuxt-modules/i18n is compliant with Nuxt too).\n- [x] Check existing [discussions](https://github.com/nuxt-modules/i18n/discussions) and [issues](https://github.com/nuxt/nuxt/issues).",[3106],{"name":3020,"color":3021},3596,"Doc: add clear instructions how to set language fallback","2025-05-12T14:17:43Z","https://github.com/nuxt-modules/i18n/issues/3596",0.66271096,{"description":3113,"labels":3114,"number":3116,"owner":3023,"repository":3024,"state":3098,"title":3117,"updated_at":3118,"url":3119,"score":3120},"### Environment\n\n- Operating System: `Darwin`\n- Node Version: `v22.15.1`\n- Nuxt Version: `3.15.4`\n- CLI Version: `3.21.1`\n- Nitro Version: `2.10.4`\n- Package Manager: `pnpm@9.15.0`\n- Builder: `-`\n- User Config: `extends`, `devtools`, `imports`, `site`, `experimental`, `$production`, `srcDir`, `runtimeConfig`, `components`, `eslint`, `modules`, `reka`, `dayjs`, `icon`, `prepare`, `formkit`, `tailwindcss`, `image`, `i18n`, `statamic`, `multiTenancy`, `linkChecker`, `sitemap`, `robots`, `app`, `compatibilityDate`\n- Runtime Modules: `~/modules/nuxt-multi-tenancy`, `@nuxtjs/i18n@9.5.4`, `@nuxt/eslint@0.3.13`, `@formkit/nuxt@1.6.9`, `@vueuse/nuxt@12.5.0`, `dayjs-nuxt@2.1.11`, `nuxt-prepare@2.3.1`, `reka-ui/nuxt@2.2.1`\n- Build Modules: `-`\n\n### Reproduction\n\nCan't\n\n### Describe the bug\n\nI keep getting warnings for missing baseUrl, how can i fix this? everything seems to be working fine, both on local and production.\n\nIf i use differentDomains option, the warning goes away, but i get missing domain for locale errors.\n\n\u003Cimg width=\"954\" height=\"56\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/47081b37-65fa-4da6-ab5f-f7eb2a21addf\" />\n\n### Additional context\n\n```ts\n// nuxt.config.ts\n\nimport { domains } from \"./locale-domains.config\";\n\nexport default defineNuxtConfig({\n // I18N\n i18n: {\n // baseUrl: process.env.NUXT_PUBLIC_I18N_BASE_URL || process.env.NUXT_SITE_URL,\n strategy: \"prefix\",\n multiDomainLocales: true,\n detectBrowserLanguage: false,\n langDir: \"./../src/i18n/locales/\",\n vueI18n: \"./../src/i18n/config\",\n locales: [\n {\n code: \"nl\",\n files: [\"nl-NL.ts\"],\n language: \"nl-NL\",\n domains: [\n ...[domains.nl, domains.be, domains.youkids_nl, domains.youkids_be],\n ] as string[],\n defaultForDomains: [\n ...[domains.nl, domains.be, domains.youkids_nl, domains.youkids_be],\n ] as string[],\n name: \"Nederlands\",\n isCatchallLocale: true,\n },\n {\n code: \"en\",\n file: \"en-GB.ts\",\n language: \"en-GB\",\n domains: [\n ...[domains.uk, domains.nl, domains.youkids_uk, domains.youkids_nl],\n ] as string[],\n defaultForDomains: [\n ...[domains.uk, domains.youkids_uk],\n ] as string[],\n name: \"English\",\n },\n {\n code: \"fr\",\n file: \"fr-FR.ts\",\n language: \"fr-FR\",\n domains: [\n ...[domains.fr, domains.be, domains.youkids_fr, domains.youkids_be],\n ] as string[],\n defaultForDomains: [\n ...[domains.fr, domains.youkids_fr],\n ] as string[],\n name: \"Français\",\n },\n {\n code: \"de\",\n file: \"de-DE.ts\",\n language: \"de-DE\",\n domains: [\n ...[domains.de, domains.youkids_de],\n ] as string[],\n defaultForDomains: [\n ...[domains.de, domains.youkids_de],\n ] as string[],\n name: \"Deutsch\",\n },\n ],\n customRoutes: \"page\",\n },\n});\n```\n\n\n```ts\n// locale-domains.config.ts\nexport const domains: Record\u003Cstring, string | undefined> = {\n nl: process.env.DOMAIN_NL,\n be: process.env.DOMAIN_BE,\n fr: process.env.DOMAIN_FR,\n de: process.env.DOMAIN_DE,\n uk: process.env.DOMAIN_UK,\n youkids_nl: process.env.DOMAIN_YOUKIDS_NL,\n youkids_be: process.env.DOMAIN_YOUKIDS_BE,\n youkids_fr: process.env.DOMAIN_YOUKIDS_FR,\n youkids_de: process.env.DOMAIN_YOUKIDS_DE,\n youkids_en: process.env.DOMAIN_YOUKIDS_EN,\n} as const;\n\nexport const developmentDomains: Record\u003Cstring, string> = {\n nl: \"localhost:3000\",\n be: \"be.localhost:3000\",\n fr: \"fr.localhost:3000\",\n de: \"de.localhost:3000\",\n uk: \"uk.localhost:3000\",\n youkids_nl: \"nl.youkids.localhost:3000\",\n youkids_be: \"be.youkids.localhost:3000\",\n youkids_fr: \"fr.youkids.localhost:3000\",\n youkids_de: \"de.youkids.localhost:3000\",\n youkids_en: \"en.youkids.localhost:3000\",\n} as const;\n\nexport const i18nDomains = [domains.nl, domains.be, domains.fr, domains.de, domains.uk, domains.youkids_nl, domains.youkids_be, domains.youkids_fr, domains.youkids_de, domains.youkids_en] as string[];\nexport const developmentI18nDomains = [developmentDomains.nl, developmentDomains.be, developmentDomains.fr, developmentDomains.de, developmentDomains.uk, developmentDomains.youkids_nl, developmentDomains.youkids_be, developmentDomains.youkids_fr, developmentDomains.youkids_de, developmentDomains.youkids_en] as string[];\n```\n\n### Logs\n\n```shell\nWARN I18n baseUrl is required to generate valid SEO tag links.\n```",[3115],{"name":3020,"color":3021},3727,"Warn: I18n baseUrl is required to generate valid SEO tag links.","2025-07-20T20:16:57Z","https://github.com/nuxt-modules/i18n/issues/3727",0.6776876,["Reactive",3122],{},["Set"],["ShallowReactive",3125],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fONIbMe0R6oNiq630VLtzvaFW7kgyj-OgbG02bOlGFq4":-1},"/nuxt-modules/i18n/2474"]