|\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).",[3042],{"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.73147833,{"description":3049,"labels":3050,"number":3052,"owner":3023,"repository":3024,"state":3025,"title":3053,"updated_at":3054,"url":3055,"score":3056},"### 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).",[3051],{"name":3020,"color":3021},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.7356294,{"description":3058,"labels":3059,"number":3061,"owner":3023,"repository":3024,"state":3025,"title":3062,"updated_at":3063,"url":3064,"score":3065},"### 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```",[3060],{"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.7403377,{"description":3067,"labels":3068,"number":3070,"owner":3023,"repository":3024,"state":3025,"title":3071,"updated_at":3072,"url":3073,"score":3074},"### Describe the feature\n\nI’d like to configure my application so that a locale like pt-BR uses a human‑friendly prefix instead of the code in URLs.\n\nE.g. `/brazil/about` instead of `/pt-BR/about`.\n\nIdeally, something like this:\n\n```js\nlocales: [\n {\n code: 'pt-BR',\n file: 'pt-BR.yml',\n language: 'pt-BR',\n prefix: 'brazil'\n }\n]\n```\n\nThat way:\n\n- I don’t need to map every route manually via pages config or macros.\n- I can keep my existing locale code value (`pt-BR`) unchanged.\n- I can support a custom prefix string (`brazil`) that’s meaningful and SEO‑friendly.\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).",[3069],{"name":3020,"color":3021},3761,"[Feature Request] Allow custom prefix per locale","2025-07-25T05:47:03Z","https://github.com/nuxt-modules/i18n/issues/3761",0.74700356,{"description":3076,"labels":3077,"number":3078,"owner":3023,"repository":3024,"state":3079,"title":3080,"updated_at":3081,"url":3082,"score":3083},"## 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,"closed","Bug: strategy 'prefix' doesn't respect URL prefix when accept-language header is present","2025-07-23T06:43:58Z","https://github.com/nuxt-modules/i18n/issues/3750",0.4822326,{"description":3085,"labels":3086,"number":3090,"owner":3023,"repository":3024,"state":3079,"title":3080,"updated_at":3091,"url":3092,"score":3093},"## 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### Configuration\n```typescript\n// nuxt.config.ts\nexport default defineNuxtConfig({\n modules: ['@nuxtjs/i18n'],\n i18n: {\n strategy: 'prefix',\n locales: [\n { code: 'zh', name: '中文' },\n { code: 'en', name: 'English' },\n { code: 'ja', name: '日本語' },\n { code: 'ko', name: '한국어' }\n ],\n defaultLocale: 'zh',\n detectBrowserLanguage: {\n useCookie: true,\n cookieKey: 'i18n_redirected',\n redirectOn: 'root'\n }\n }\n})\n```\n\n### Reproduction Steps\n1. Set up Nuxt project with above i18n configuration\n2. Create a simple page with locale-specific content\n3. Make request to `/zh` with specific accept-language header\n\n### cURL Example\n```bash\ncurl -H \"Accept-Language: en;zh-ch,q=0.9;kr,q=0.8\" http://localhost:3000/zh\n```\n\n### Expected Result\nPage should display in Chinese (zh) as specified by the URL prefix `/zh`.\n\n### Actual Result\nPage displays in English (en) as specified by the accept-language header priority.\n\n### Environment\n- Nuxt version: v4.0\n- @nuxtjs/i18n version: v10.0.2",[3087],{"name":3088,"color":3089},"need reproduction","CD234A",3752,"2025-07-23T10:21:05Z","https://github.com/nuxt-modules/i18n/issues/3752",0.52091193,{"description":3095,"labels":3096,"number":3100,"owner":3023,"repository":3024,"state":3079,"title":3101,"updated_at":3102,"url":3103,"score":3104},"## 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_",[3097],{"name":3098,"color":3099},"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.67909414,{"description":3106,"labels":3107,"number":3112,"owner":3023,"repository":3024,"state":3079,"title":3113,"updated_at":3102,"url":3114,"score":3115},"### Environment\n\n- Operating System: Windows 11\n- Node Version: 18.18.2\n- Nuxt Version: 3.15.0\n- @nuxtjs/i18n: 9.5.3\n\n### Reproduction\n\nhttps://stackblitz.com/edit/bobbiegoede-nuxt-i18n-starter-7rohnkcc?file=nuxt.config.ts\n\n### Describe the bug\n\nI am using the following configuration:\n\n```\ni18n: {\n locales: [ ... ],\n strategy: 'prefix_except_default',\n langDir: 'lang',\n lazy: true,\n defaultLocale: 'en',\n detectBrowserLanguage: {\n useCookie: true,\n cookieKey: 'i18n_redirected',\n fallbackLocale: 'en',\n redirectOn: 'no prefix',\n alwaysRedirect: true,\n }\n}\n```\n\nExpected:\nA Japanese user is on the link `https://www.xxx.com/ja/about`, now opening the following links should result in the following redirection behavior:\n`https://www.xxx.com/nl/about` → `https://www.xxx.com/nl/about`\n`https://www.xxx.com/about` → `https://www.xxx.com/ja/about`\n`https://www.xxx.com` → `https://www.xxx.com/ja`\n\nThis also matches the documentation:\n`'no prefix' - a more permissive variant of 'root' that will detect the browser locale on the root path ('/') and also on paths that have no locale prefix (like '/foo'). Only effective when using strategy other than 'no_prefix'.`\n\nActual behavior (only listing the problematic case):\n`https://www.xxx.com/nl/about` → `https://www.xxx.com/ja/about`\n\nThe above issue exists in versions v7, v8, and v9.\n\n\n### Additional context\n\n_No response_\n\n### Logs\n\n```shell\n\n```",[3108,3109],{"name":3098,"color":3099},{"name":3110,"color":3111},"possible regression","B78041",3545,"The behavior of redirectOn set to 'no prefix' from version 7 to version 9 is inconsistent with the documentation.","https://github.com/nuxt-modules/i18n/issues/3545",0.69330966,["Reactive",3117],{},["Set"],["ShallowReactive",3120],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fnEK2E3nH-YslZDwT_MqjyembA5mOOWE3_gEYK8T7vJo":-1},"/nuxt-modules/i18n/3751"]