|\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).",[3079],{"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.7003497,{"description":3086,"labels":3087,"number":3089,"owner":3022,"repository":3023,"state":3090,"title":3091,"updated_at":3092,"url":3093,"score":3094},"### Environment\n\n------------------------------\r\n- Operating System: Linux\r\n- Node Version: v20.14.0\r\n- Nuxt Version: 3.12.4\r\n- CLI Version: 3.12.0\r\n- Nitro Version: 2.9.7\r\n- Package Manager: yarn@1.22.22\r\n- Builder: -\r\n- User Config: ssr, compatibilityDate, devtools, modules, components, runtimeConfig, site, ogImage, i18n, tailwindcss, sitemap, content, gtag, cookieControl\r\n- Runtime Modules: @nuxtjs/i18n@8.3.3, @nuxtjs/tailwindcss@6.12.1, @nuxtjs/seo@2.0.0-rc.16, @nuxt/content@2.13.2, @nuxthq/studio@2.0.3, nuxt-gtag@2.1.0, @dargmuesli/nuxt-cookie-control@8.4.7\r\n- Build Modules: -\r\n------------------------------\n\n### Reproduction\n\nwww.vinoteqa.com/blog\n\n### Describe the bug\n\nWhen I try to visit a page, other than the root, I get redirected to the localized url but still get a error. As soon as I reload the page, it is displayed correctly. \r\n\r\nTry it at: www.vinoteqa.com/blog\r\n\r\nAm I missing some configuration?\n\n### Additional context\n\n```ts\r\n i18n: {\r\n defaultLocale: 'en',\r\n locales: [{\r\n code: 'en',\r\n iso: 'en',\r\n name: 'English',\r\n file: 'en.json',\r\n },\r\n {\r\n code: 'de',\r\n iso: 'de',\r\n name: 'Deutsch',\r\n file: 'de.json',\r\n },\r\n {\r\n code: 'it', \r\n iso: 'it',\r\n name: 'Italiano',\r\n file: 'it.json',\r\n }],\r\n strategy: 'prefix',\r\n lazy: false,\r\n langDir: 'locales/',\r\n },\r\n ```\r\n \r\n \n\n### Logs\n\n_No response_",[3088],{"name":3019,"color":3020},3062,"closed","404 on all pages other than root with `prefix` strategy","2025-05-21T19:36:56Z","https://github.com/nuxt-modules/i18n/issues/3062",0.67899054,{"description":3096,"labels":3097,"number":3101,"owner":3022,"repository":3023,"state":3090,"title":3102,"updated_at":3103,"url":3104,"score":3105},"## 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",[3098],{"name":3099,"color":3100},"need reproduction","CD234A",3752,"Bug: strategy 'prefix' doesn't respect URL prefix when accept-language header is present","2025-07-23T10:21:05Z","https://github.com/nuxt-modules/i18n/issues/3752",0.68339986,{"description":3107,"labels":3108,"number":3115,"owner":3022,"repository":3023,"state":3090,"title":3116,"updated_at":3117,"url":3118,"score":3119},"### 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```",[3109,3112],{"name":3110,"color":3111},"scope: language detection","1B89B8",{"name":3113,"color":3114},"possible regression","B78041",3545,"The behavior of redirectOn set to 'no prefix' from version 7 to version 9 is inconsistent with the documentation.","2025-06-22T23:03:38Z","https://github.com/nuxt-modules/i18n/issues/3545",0.68898773,["Reactive",3121],{},["Set"],["ShallowReactive",3124],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$f0Q69HGWkt_zaqqAX0UIhD_fn0DQb3bxNNaCv629uY2I":-1},"/nuxt-modules/i18n/3086"]