|\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).",[3050],{"name":3019,"color":3020},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.6878566,{"description":3057,"labels":3058,"number":3060,"owner":3022,"repository":3023,"state":3024,"title":3061,"updated_at":3062,"url":3063,"score":3064},"### Describe the feature\n\n### Description\n\nHi there,\nI'm working on a Nuxt project that needs to serve multiple countries, each on a separate domain. Each domain has its own i18n requirements:\n\n* Some domains have **only one official language** (e.g., `site.fr` → French only, no prefix needed).\n* Others have **multiple languages**, and the strategy varies:\n\n * Some use `prefix_except_default` (e.g., `site.ca` with `fr` and `en`)\n * Others use `prefix` (e.g., `site.be` with `fr` and `nl`)\n\n### Constraints:\n\n* I want to **use a single Nuxt build** to serve all domains.\n* I need to **dynamically adapt the i18n config** (strategy, locales, defaultLocale) based on the current domain (host).\n* I also need to **detect the current domain** at runtime (server & client) to configure things like API base URLs.\n* Compatible with SSR & SEO\n\n### Problem\n\nCurrently, I need to generate and deploy **one build per domain** to accommodate the differences in `strategy`, `defaultLocale`, and available `locales`. That means I must build the app **8 times**, which is time-consuming and hard to maintain.\n\n### Question\n\nIs there currently any **official or recommended way** to support multiple domains with different i18n strategies **using a single build**?\n\nIf not, would this be considered a valid feature request, or are there technical constraints that prevent this kind of setup?\n\nThanks a lot for your help!\n\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).",[3059],{"name":3019,"color":3020},3748,"Support complex multi-domain i18n configurations in a single build","2025-07-22T22:16:46Z","https://github.com/nuxt-modules/i18n/issues/3748",0.69696635,{"description":3066,"labels":3067,"number":3069,"owner":3022,"repository":3023,"state":3024,"title":3070,"updated_at":3071,"url":3072,"score":3073},"### 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```",[3068],{"name":3019,"color":3020},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.7028153,{"description":3075,"labels":3076,"number":3078,"owner":3022,"repository":3023,"state":3024,"title":3079,"updated_at":3080,"url":3081,"score":3082},"### Environment\n\n- Operating System: `Darwin`\n- Node Version: `v21.7.1`\n- Nuxt Version: `3.16.2`\n- CLI Version: `3.25.0`\n- Nitro Version: `2.11.9`\n- Package Manager: `npm@10.9.0`\n- Builder: `-`\n- User Config: `codegen`, `compatibilityDate`, `css`, `device`, `devtools`, `i18n`, `image`, `modules`, `runtimeConfig`, `scripts`, `srcDir`, `svgo`, `vite`, `watch`\n- Runtime Modules: `@bootstrap-vue-next/nuxt@0.29.3`, `@nuxt/eslint@1.3.0`, `@nuxt/fonts@0.11.2`, `@nuxt/image@1.10.0`, `@nuxt/scripts@0.11.6`, `@nuxtjs/device@3.2.4`, `@nuxtjs/i18n@9.5.3`, `@nuxtjs/stylelint-module@5.2.1`, `nuxt-svgo@4.0.19`, `nuxt-swiper@2.0.0`\n- Build Modules: `-`\n\n\n### Reproduction\n\nHere is the reproduction:\n\nhttps://stackblitz.com/edit/bobbiegoede-nuxt-i18n-starter-rskcxctd\n\n### Describe the bug\n\nWhen you translate your pages with defineI18nRoute (or maybe into `pages` key into i18n config) is getting rid when strategy in no prefixed (bot _no_prefix_ and _prefix_except_default_)\n\n### Additional context\n\n_No response_\n\n### Logs\n\n```shell\n\n```",[3077],{"name":3019,"color":3020},3598,"defineI18nRoute is not working with no_prefix strategy","2025-05-13T14:21:14Z","https://github.com/nuxt-modules/i18n/issues/3598",0.7082977,{"description":3084,"labels":3085,"number":3086,"owner":3022,"repository":3023,"state":3087,"title":3088,"updated_at":3089,"url":3090,"score":3091},"## Bug Report\n\n### Description\nWhen using strategy: 'prefix', the i18n module doesn't respect the URL prefix language when the browser sends an accept-language header.\n\n### Expected Behavior\nWhen accessing /zh path, the page should display in Chinese (zh) regardless of the accept-language header value.\n\n### Actual Behavior\nWhen accessing /zh path with accept-language: en;zh-ch,q=0.9;kr,q=0.8, the page displays in English (en) instead of Chinese (zh).\n\n### Steps to Reproduce\n1. Configure i18n with strategy: 'prefix'\n2. Access URL with language prefix (e.g., /zh)\n3. Send request with accept-language header containing different language preference\n4. Observe that the page displays in the accept-language preferred language instead of the URL prefix language\n\n### Configuration\n- Strategy: prefix\n- URL example: /zh\n- Accept-Language header: en;zh-ch,q=0.9;kr,q=0.8\n\n### Expected Result\nPage should display in Chinese (zh) as specified by the URL prefix.\n\n### Actual Result\nPage displays in English (en) as specified by the accept-language header.",[],3751,"closed","Bug: strategy 'prefix' doesn't respect URL prefix when accept-language header is present","2025-07-23T06:44:02Z","https://github.com/nuxt-modules/i18n/issues/3751",0.5290925,{"description":3093,"labels":3094,"number":3095,"owner":3022,"repository":3023,"state":3087,"title":3088,"updated_at":3096,"url":3097,"score":3098},"## Bug Report\n\n### Description\nWhen using , the i18n module doesn't respect the URL prefix language when the browser sends an header.\n\n### Expected Behavior\nWhen accessing path, the page should display in Chinese (zh) regardless of the header value.\n\n### Actual Behavior\nWhen accessing path with , the page displays in English (en) instead of Chinese (zh).\n\n### Steps to Reproduce\n1. Configure i18n with \n2. Access URL with language prefix (e.g., )\n3. Send request with header containing different language preference (e.g., )\n4. Observe that the page displays in the accept-language preferred language instead of the URL prefix language\n\n### Configuration\n- Strategy: \n- URL example: \n- Accept-Language header: \n\n### Expected Result\nPage should display in Chinese (zh) as specified by the URL prefix.\n\n### Actual Result \nPage displays in English (en) as specified by the accept-language header.",[],3750,"2025-07-23T06:43:58Z","https://github.com/nuxt-modules/i18n/issues/3750",0.5330399,{"description":3100,"labels":3101,"number":3105,"owner":3022,"repository":3023,"state":3087,"title":3106,"updated_at":3107,"url":3108,"score":3109},"## Updates\n\n- 2024/01/02: Updated reproduction and steps to reproduce at https://github.com/nuxt-modules/i18n/issues/2524#issuecomment-1873823456\n- 2025/05/02: Updated reproduction for v9.5.4: https://github.com/nuxt-modules/i18n/issues/2524#issuecomment-2847024120\n\n## Original post\n\n### Environment\n\nWorking directory: /home/projects/aoniwxvlm.github 13:55:30\nNuxt project info: 13:55:30\n\n------------------------------\n- Operating System: Linux\n- Node Version: v18.18.0\n- Nuxt Version: 3.8.0\n- CLI Version: 3.9.1\n- Nitro Version: 2.7.0\n- Package Manager: npm@9.4.2\n- Builder: -\n- User Config: devtools, modules, i18n\n- Runtime Modules: @nuxtjs/i18n@8.0.0-rc.5\n- Build Modules: -\n------------------------------\n\n### Reproduction\n\nhttps://stackblitz.com/edit/github-fyaxh8\n\n### Describe the bug\n\nThe root redirect takes the `Accept-Language` header into account:\n\n```\ncurl -H \"Accept-Language: fr\" -I http://localhost:3000\n```\n\n```\nHTTP/1.1 302 Found\naccess-control-allow-origin: *\nlocation: /fr\ncontent-type: text/html\ndate: Wed, 25 Oct 2023 11:49:52 GMT\nconnection: close\n```\n\nBut everything else does not:\n\n```\ncurl -H \"Accept-Language: fr\" -I http://localhost:3000/foo\n```\n\n```\nHTTP/1.1 302 Found\naccess-control-allow-origin: *\nlocation: /en/foo\ncontent-type: text/html\ndate: Wed, 25 Oct 2023 11:49:41 GMT\nconnection: close\n```\n\nThis also relates to #2131 because I'm using the `prefix` strategy, which means I should actually get a 404 on the `/foo` request. Therefore, I think fixing #2131 will also fix this issue, but not vice versa.\n\n### Additional context\n\n_No response_\n\n### Logs\n\n_No response_",[3102],{"name":3103,"color":3104},"scope: language detection","1B89B8",2524,"Inconsistent handling of `Accept-Language` header","2025-06-22T23:03:38Z","https://github.com/nuxt-modules/i18n/issues/2524",0.62550145,["Reactive",3111],{},["Set"],["ShallowReactive",3114],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$f1c2agLNgiax3ltvLfnirVQcUGiG3xxM1Lp17Qw_6vWQ":-1},"/nuxt-modules/i18n/3752"]