|\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).",[3060],{"name":3030,"color":3031},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.7411955,{"description":3067,"labels":3068,"number":3070,"owner":3019,"repository":3020,"state":3021,"title":3071,"updated_at":3072,"url":3073,"score":3074},"### 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```",[3069],{"name":3030,"color":3031},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.7508503,{"description":3076,"labels":3077,"number":3081,"owner":3019,"repository":3020,"state":3021,"title":3082,"updated_at":3083,"url":3084,"score":3085},"### Environment\n\n* Nuxt: `^3.x`\n* @nuxtjs/i18n: `^9.x`\n* Package manager: `pnpm`\n* Node: `>=18`\n* OS: macOS\n\n### Reproduction\n\n\n#### 🧩 What I'm trying to do\n\nI want to **dynamically disable translation for some pages**, such as `/admin` or any route matching a certain pattern, by injecting into the `i18n.pages` config like this:\n\n```ts\ni18n: {\n customRoutes: 'config',\n pages: {\n 'admin': false\n }\n}\n```\n\nBut I want to do this **dynamically from another Nuxt module**, based on logic like:\n\n* Whether route path starts with `/admin`\n* Whether the file name includes certain keywords\n* Optional user-defined exclude rule function\n\n---\n\n#### 📌 Problem\n\nThe `pages:extend` hook gives access to all generated Nuxt pages, and I can detect which pages I want to exclude, then inject:\n\n```ts\nnuxt.options.i18n.pages = {\n ...nuxt.options.i18n.pages,\n ...detectedPagesToExclude\n}\n```\n\nHowever, **`@nuxtjs/i18n` appears to snapshot the config too early**, likely before `pages:extend` runs, and generates `i18n-options.mjs` using an internal `ctx.options`, so my dynamic changes to `nuxt.options.i18n.pages` do **not reflect** in the generated options.\n\n---\n\n### Describe the bug\n\n\n#### ❓Question\n\nIs there an **official or recommended way** to dynamically inject/disable page translation settings (`customRoutes: 'config'` + `pages`) at runtime or module time?\n\nMore specifically:\n\n* Can you expose a Nuxt hook like `i18n:extendPagesConfig(pages)` before generating `i18n-options.mjs`?\n* Or is there a safe way to hook into `ctx.options.pages` in a custom module?\n* Or should we write a wrapper module that overrides the `i18n` module setup?\n\n---\n\n#### 🧪 What I tried\n\n```ts\nnuxt.hook('pages:extend', pages => {\n for (const page of pages) {\n if (page.path.startsWith('/admin') && page.name) {\n nuxt.options.i18n.pages[page.name] = false\n }\n }\n})\n```\n\nBut this doesn't reflect in the generated `.nuxt/i18n-options.mjs` file.\n\n---\n\n#### 🙏 Feature request?\n\nCould you consider adding a hook like:\n\n```ts\nnuxt.hook('i18n:extendPagesConfig', (pages: NuxtPage[], currentConfig: Record\u003Cstring, any>) => {\n // modify and return updated pages config\n})\n```\n\nSo that other modules (like `i18n-exclude`) can safely hook in and modify translation strategy for specific routes?\n\n---\n\nLet me know if there's already a supported way to do this.\n\nThanks a lot for the amazing work on `@nuxtjs/i18n` 🙌\n\n\n\n### Additional context\n\n_No response_\n\n### Logs\n\n```shell\n\n```",[3078],{"name":3079,"color":3080},"feature request","ffbb00",3716,"Allow modules to modify route localization","2025-07-03T17:06:13Z","https://github.com/nuxt-modules/i18n/issues/3716",0.7519583,{"description":3087,"labels":3088,"number":3098,"owner":3019,"repository":3020,"state":3099,"title":3100,"updated_at":3101,"url":3102,"score":3103},"### Describe the feature\r\n\r\nAs discussed on Discord with @BobbieGoede and @harlan-zw, there is Harlan's amazing [site-config](https://nuxtseo.com/site-config/getting-started/background) project which aims to provide a central method for general site configuration so not every other module has to implement this itself.\r\n\r\n`nuxt-i18n` allows to specify a `baseUrl`, which is exactly such a reimplementation. I propose to support reading the `i18n.baseUrl` from `site.url` when it is available, keeping the fallback to `i18n.baseUrl`.\r\n\r\nOf course `i18n.baseUrl` *could* be marked as deprecated until the final `v8` release if everything works fine outsourcing the `baseUrl` to `nuxt-site-config` to keep a separation of concerns.\r\n\r\n### Additional information\r\n\r\n- [x] Would you be willing to help implement this feature?\r\n- [ ] Could this feature be implemented as a module?\r\n\r\n### Final checks\r\n\r\n- [X] Read the [contribution guide](https://nuxt.com/docs/community/contribution) (The contribution guideline of nuxt-modules/i18n is compliant with Nuxt too).\r\n- [X] Check existing [discussions](https://github.com/nuxt-modules/i18n/discussions) and [issues](https://github.com/nuxt/nuxt/issues).",[3089,3092,3095],{"name":3090,"color":3091},"need discussion","E9EC2E",{"name":3093,"color":3094},"PR Welcome","40922A",{"name":3096,"color":3097},"scope: configuration","b60205",2474,"closed","feat: support `nuxt-site-config`","2025-07-03T13:00:13Z","https://github.com/nuxt-modules/i18n/issues/2474",0.63869154,{"description":3105,"labels":3106,"number":3113,"owner":3019,"repository":3020,"state":3099,"title":3114,"updated_at":3115,"url":3116,"score":3117},"### Discussed in https://github.com/nuxt-modules/i18n/discussions/2958\r\n\r\n\u003Cdiv type='discussions-op-text'>\r\n\r\n\u003Csup>Originally posted by **silgon** May 26, 2024\u003C/sup>\r\nI'm trying to build a multi-domain website. However, I want part of the languages to be on one site. I would like something like the following:\r\n\r\n```typescript\r\nexport default defineNuxtConfig({\r\n // ...\r\n\r\n i18n: {\r\n locales: [\r\n {\r\n code: 'en-US',\r\n domain: 'mydomain.com'\r\n },\r\n {\r\n code: 'es-MX',\r\n domain: 'mydomain.com/es-MX'\r\n },\r\n {\r\n code: 'ch-DE',\r\n domain: 'another-domain.ch'.\r\n },\r\n {\r\n code: 'ch-FR',\r\n domain: 'another-domain.ch/ch-FR'\r\n },\r\n ],\r\n differentDomains: true\r\n // Or enable the option in production only\r\n // differentDomains: (process.env.NODE_ENV === 'production')\r\n },\r\n\r\n // ...\r\n})\r\n```\r\n\r\nI hope that it's clear what I want to do given the configuration. My guidelines where the following link https://v8.i18n.nuxtjs.org/guide/different-domains\r\n\r\nCould somebody give me some guidance? I'm not able to do what I want. (also some insights in the sitemap with that kind of configuration would be cool, but not sure if this is the right place)\r\n\r\nWhen I'm in the same domain, the language does not change (I use the href configuration as specified in the documentation)\u003C/div>",[3107,3110],{"name":3108,"color":3109},"need more info","e295d6",{"name":3111,"color":3112},"scope: domains","fbca04",2979,"Multi-Domain Website configuration with partial shared domains","2025-05-24T22:26:46Z","https://github.com/nuxt-modules/i18n/issues/2979",0.68206155,{"description":3119,"labels":3120,"number":3124,"owner":3019,"repository":3020,"state":3099,"title":3125,"updated_at":3126,"url":3127,"score":3128},"### Environment\n\n- Operating System: `Darwin`\n- Node Version: `v22.15.0`\n- Nuxt Version: `3.17.4`\n- CLI Version: `3.25.1`\n- Nitro Version: `2.11.12`\n- Package Manager: `npm@10.9.2`\n- Builder: `-`\n- User Config: `devtools`, `modules`, `i18n`, `compatibilityDate`, `app`\n- Runtime Modules: `@nuxtjs/i18n@9.5.4`\n- Build Modules: `-`\n\n\n### Reproduction\n\nhttps://github.com/cjpearson/switch-locale-path-repro\n\n### Describe the bug\n\nWhen using different domains for each locale, `switchLocalePath` will return an absolute URL for the current route in a different locale. However, if `app.baseURL` will not be included if it is set.\n\nFor example, calling `switchLocalePath` on `http://en.localhost/prefix/testing` will return `http://nl.localhost/testing`.\n\nThis is also the case when using path prefixes instead of domains, but less of an issue in practice since NuxtLink automatically adds the baseURL.\n\n### Additional context\n\n_No response_\n\n### Logs\n\n```shell\n\n```",[3121,3122],{"name":3041,"color":3042},{"name":3123,"color":3112},"domain",3628,"`switchLocalePath` should include the baseURL","2025-05-22T15:50:22Z","https://github.com/nuxt-modules/i18n/issues/3628",0.68650234,{"description":3130,"labels":3131,"number":3132,"owner":3019,"repository":3020,"state":3099,"title":3133,"updated_at":3134,"url":3135,"score":3136},"In order for the runtime config merging to work properly, there must be an entry for each locale in `domainLocales`. This can be done in the nuxt.config like so:\n\n\n```ts\ndefineNuxtConfig({\n runtimeConfig: {\n public: i18n: {\n domainLocales: {\n en: { domain: '' },\n de: { domain: '' }\n }\n }\n }\n})\n```\n\nBut to make this easier for users, nuxt-i18n could pre-configure these values based on `locales` module option.",[],3694,"Pre-populate `domainLocales` based on module configuration","2025-06-25T21:20:58Z","https://github.com/nuxt-modules/i18n/issues/3694",0.7141465,["Reactive",3138],{},["Set"],["ShallowReactive",3141],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fEzHl-NDYQpJWLN4c41MuUWNEP4FyZI36_S398wY-rnc":-1},"/nuxt-modules/i18n/3053"]