|\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).",[3197],{"name":3175,"color":3176},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":3204,"labels":3205,"number":3207,"owner":3178,"repository":3179,"state":3180,"title":3208,"updated_at":3209,"url":3210,"score":3211},"### 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```",[3206],{"name":3175,"color":3176},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.6964539,{"description":3213,"labels":3214,"number":3216,"owner":3178,"repository":3179,"state":3180,"title":3217,"updated_at":3218,"url":3219,"score":3220},"### 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).",[3215],{"name":3175,"color":3176},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":3222,"labels":3223,"number":3225,"owner":3178,"repository":3179,"state":3180,"title":3226,"updated_at":3227,"url":3228,"score":3229},"### Describe the feature\n\nHello developers,\n\nI noticed that the route prefix in the Nitro configuration is hardcoded as /_i18n/. Would it be possible to provide a configuration option to customize this prefix?\n\u003Cimg width=\"3524\" height=\"1082\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/281f9764-234f-4241-981c-8deb393ffccc\" />\n\u003Cimg width=\"1458\" height=\"406\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/81553474-7205-48ad-8231-b92d3638399e\" />\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).",[3224],{"name":3175,"color":3176},3822,"Configurable Server Route Prefix for i18n Messages Endpoint","2025-09-17T09:19:34Z","https://github.com/nuxt-modules/i18n/issues/3822",0.70209295,{"description":3231,"labels":3232,"number":3233,"owner":3178,"repository":3179,"state":3234,"title":3235,"updated_at":3236,"url":3237,"score":3238},"## 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":3240,"labels":3241,"number":3242,"owner":3178,"repository":3179,"state":3234,"title":3235,"updated_at":3243,"url":3244,"score":3245},"## 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":3247,"labels":3248,"number":3252,"owner":3178,"repository":3179,"state":3234,"title":3253,"updated_at":3254,"url":3255,"score":3256},"## 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_",[3249],{"name":3250,"color":3251},"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,{"description":3258,"labels":3259,"number":3264,"owner":3178,"repository":3179,"state":3234,"title":3265,"updated_at":3254,"url":3266,"score":3267},"### 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```",[3260,3261],{"name":3250,"color":3251},{"name":3262,"color":3263},"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.6665692,["Reactive",3269],{},["Set"],["ShallowReactive",3272],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$f1c2agLNgiax3ltvLfnirVQcUGiG3xxM1Lp17Qw_6vWQ":-1},"/nuxt-modules/i18n/3752"]