|\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).",[3061],{"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.72524256,{"description":3068,"labels":3069,"number":3071,"owner":3022,"repository":3023,"state":3024,"title":3072,"updated_at":3073,"url":3074,"score":3075},"### 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).",[3070],{"name":3019,"color":3020},3761,"[Feature Request] Allow custom prefix per locale","2025-07-25T05:47:03Z","https://github.com/nuxt-modules/i18n/issues/3761",0.731108,{"description":3077,"labels":3078,"number":3080,"owner":3022,"repository":3023,"state":3024,"title":3081,"updated_at":3082,"url":3083,"score":3084},"### Environment\n\n- Operating System: Darwin\n- Node Version: v22.15.0\n- Nuxt Version: 3.17.3\n- CLI Version: 3.25.1\n- Nitro Version: 2.11.12\n- Package Manager: npm@10.9.2\n- Builder: -\n- User Config: compatibilityDate, devtools, modules, i18n, nitro\n- Runtime Modules: @nuxt/content@3.5.1, @nuxtjs/i18n@9.5.4\n- Build Modules: -\n\n\n### Reproduction\n\nA minimal reproduction of this issue can be found in the following repository: https://github.com/odan-sandbox/nuxt-content-and-i18n-no_prefix-example\n\n\n### Describe the bug\n\nWhen using the `no_prefix` strategy in `nuxt-i18n`, the locale detection based on the URL pathname is not functioning as expected. This results in incorrect locale assignment during SSR/SSG.\n\nFor example, accessing `/en/about` and `/ja/about` should render the corresponding locale-specific content, but instead, both paths are rendered using the default or server locale, ignoring the locale information in the pathname.\n\nThis issue causes problems for multilingual documentation sites using `nuxt/content`, where the content is structured by locale (e.g., `docs/en/about.md`, `docs/ja/about.md`). During SSG, both paths may be generated with the same language content, leading to incorrect output.\n\nIf a PR to resolve this issue is considered appropriate, I would be willing to work on it.\n\n\n### Additional context\n\nRelated: https://github.com/nuxt-modules/i18n/issues/3609\n\n### Logs\n\n```shell\n\n```",[3079],{"name":3019,"color":3020},3619,"Locale detection not working with `no_prefix` strategy","2025-05-19T06:13:27Z","https://github.com/nuxt-modules/i18n/issues/3619",0.7350923,{"description":3086,"labels":3087,"number":3089,"owner":3022,"repository":3023,"state":3090,"title":3091,"updated_at":3092,"url":3093,"score":3094},"### Environment\n\n### Version\n \n```\n- nuxt : \"^3.12.4\",\n- nuxtjs/i18n@8.5.2 || nuxtjs/i18n@8.0.0-rc.3 \n```\n\n### i18n.config.ts\n```\nlazy: true,\nlangDir: 'locales',\nstrategy: 'prefix',\ndefaultLocale: 'en',\nfallbackLocale: 'en',\ndetectBrowserLanguage: {\n redirectOn: 'root'\n},\ncompilation: {\n strictMessage: false\n},\nlocales: [\n { code: 'en', file: 'en.json' },\n { code: 'es', file: 'es.json' },\n { code: 'fr', file: 'fr.json' },\n { code: 'de', file: 'de.json' }\n]\n```\n\n### Reproduction\n\nFor reproduce need to close tabs can't do it by stackblitz.\n\n### Describe the bug\n\n### Example:\n\n```\n1. Open localhost:3000/de, the cookie is set correctly: i18n_redirected=de.\n2. Close the tab.\n3. In a new tab, type localhost:3000/de in the address bar, but don’t hit Enter.\n4. Replace /de with /es, then delete /es and press Enter to navigate to localhost:3000.\n```\n\n### Result:\nIt redirects to `/es`, although `/de` is expected — because there was no actual navigation to `/es`, only manual editing of the address bar.\nThe same happens when selecting a URL from the browser’s dropdown history.\n\nThis causes issues: the browser often autofills URLs with old locales, and even a brief appearance of something like `localhost:3000/en` may change the locale. The user won’t return to their original locale `/de` unless they manually reselect it.\n\nThis behavior is non-obvious. I couldn’t find anything in the docs about change the locale by manual browser bar without transition. Changing the strategy isn’t an option — it's tightly coupled with SEO and app logic.\n\n### Expected behavior:\nLocale should change only after explicit navigation, `not just by typing or selecting a URL in the browser` without transition.\n\n### Question:\nIs this expected behavior? Is there any way to change it via configuration?\n\n### Additional context\n\nIt doesn’t matter that this happens on localhost or production.\n\n### Logs\n\n```shell\n\n```",[3088],{"name":3019,"color":3020},3591,"closed","The locale changes without an actual navigation — just by typing the URL manually or selecting it from browser history.","2025-05-20T23:34:24Z","https://github.com/nuxt-modules/i18n/issues/3591",0.70132166,{"description":3096,"labels":3097,"number":3107,"owner":3022,"repository":3023,"state":3090,"title":3108,"updated_at":3109,"url":3110,"score":3111},"### Environment\n\n\"@nuxtjs/i18n\": \"^8.0.0-beta.10\",\n\n### Reproduction\n\nI have the following pages:\r\n- `terms.vue`\r\n- `terms-fi.vue`\r\n\r\nand my `nuxt.config.ts` has the following:\r\n```\r\n customRoutes: 'config', // disable custom route with page components\r\n pages: {\r\n terms: {\r\n fi: '/terms-fi',\r\n },\r\n },\r\n```\r\nIt works correctly when going from Finnish to English. Though when I am at `/fi/terms-fi` (the Finnish page) and I switch to english with `switchLocalePath` the routes becomes `terms-fi` and it should just be `terms`\n\n### Describe the bug\n\nError in the route when switching language if custom pages are defined.\n\n### Additional context\n\n_No response_\n\n### Logs\n\n_No response_",[3098,3101,3104],{"name":3099,"color":3100},"🍰 p2-nice-to-have","0e8a16",{"name":3102,"color":3103},"scope: routing","21CD73",{"name":3105,"color":3106},"PR Welcome","40922A",2033,"Custom routes issue with switchLocalePath","2025-05-22T23:35:14Z","https://github.com/nuxt-modules/i18n/issues/2033",0.7017758,{"description":3113,"labels":3114,"number":3121,"owner":3022,"repository":3023,"state":3090,"title":3122,"updated_at":3123,"url":3124,"score":3125},"### Environment\n\n- Operating System: macOS Ventura 13\r\n- Node Version: v19.9.0\r\n- Nuxt Version: 3.7.3\r\n- Nitro Version: 2.6.3\r\n- Package Manager: pnpm@8.9.2\r\n- Builder: -\r\n- User Config: modules, i18n\r\n- Runtime Modules: @nuxtjs/i18n@8.0.0-rc.5\r\n- Build Modules: -\n\n### Reproduction\n\nhttps://i18n-test.designbydc.de/\r\nAuth: **bug** /// **i18n-test$**\r\n\r\n-----\r\n**Config:**\r\n```\r\n{\r\n...\r\ni18n: {\r\n defaultLocale: 'de',\r\n langDir: 'locales',\r\n lazy: true,\r\n locales: [\r\n {\r\n code: 'en',\r\n iso: 'en-GB',\r\n name: 'EN',\r\n file: 'en-GB.json'\r\n },\r\n {\r\n code: 'de',\r\n iso: 'de-DE',\r\n name: 'DE',\r\n file: 'de-DE.json'\r\n }\r\n ],\r\n compilation: {\r\n strictMessage: false\r\n }\r\n }\r\n}\r\n```\r\n-----\r\n**Dependencies:**\r\n```\r\n\"devDependencies\": {\r\n \"@nuxt/devtools\": \"latest\",\r\n \"@nuxtjs/i18n\": \"^v8.0.0-rc.5\",\r\n \"nuxt\": \"^3.7.3\",\r\n \"sass\": \"^1.68.0\",\r\n \"sass-loader\": \"^13.3.0\"\r\n },\r\n```\n\n### Describe the bug\n\nAfter pre-rendering pages by default i18n configuration with `nuxt generate`, the browser language detection not automatically redirect visitors to their preferred language on initial page load. \r\n\r\nTo reproduce it click on the language navigation so the default cookie **i18n_redirected** will be enabled. \r\n\r\nThe bug occurs if you click on EN and try to load the page without pathname \"/en\". After that the wrong language link in navigation is active and the content is only partially displayed correctly suitable for the selected language.\n\n### Additional context\n\n_No response_\n\n### Logs\n\n_No response_",[3115,3118],{"name":3116,"color":3117},"scope: language detection","1B89B8",{"name":3119,"color":3120},"scope: prerender","8B39DF",2507,"Redirection to preferred language not works after pre-rendering pages","2025-06-09T22:33:59Z","https://github.com/nuxt-modules/i18n/issues/2507",0.70976424,["Reactive",3127],{},["Set"],["ShallowReactive",3130],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fgfFywefVN2mvuNHiGt57MPbJ5UuCxTFDaCH0BG1bQiA":-1},"/nuxt-modules/i18n/2784"]