\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).",[3186],{"name":3173,"color":3174},3822,"Configurable Server Route Prefix for i18n Messages Endpoint","2025-09-17T09:19:34Z","https://github.com/nuxt-modules/i18n/issues/3822",0.68521893,{"description":3193,"labels":3194,"number":3196,"owner":3176,"repository":3177,"state":3178,"title":3197,"updated_at":3198,"url":3199,"score":3200},"### 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).",[3195],{"name":3173,"color":3174},3761,"[Feature Request] Allow custom prefix per locale","2025-07-25T05:47:03Z","https://github.com/nuxt-modules/i18n/issues/3761",0.68608344,{"description":3202,"labels":3203,"number":3204,"owner":3176,"repository":3177,"state":3178,"title":3205,"updated_at":3206,"url":3207,"score":3208},"Hi, my nuxt application can be accessed through different domains, so I configured multiDomainLocales to work correctly.\nMy goal is that the SEO tags are changing based on the domain, is this possible? currently from any domain you can see the baseUrl that I configure from i18n in nuxt.config.ts.\nThese are my configurations:\n\n```typescript\n// nuxt.config.ts\nconst englishDomains = [/* ... */];\nconst portugueseDomains = [/* ... */];\nconst spanishDomains = [/* ... */];\n\nconst domains = [\n ...englishDomains,\n ...portugueseDomains,\n ...spanishDomains\n];\n\nexport default defineNuxtConfig({\n// ...\nsite: {\n multiTenancy: [\n { hosts: [/* ... */], config: { indexable: true, name: 'some name...', url: 'some url...' } },\n { hosts: [/* ... */], config: { indexable: true, name: 'some name...', url: 'some url...' } },\n { hosts: [/* ... */], config: { indexable: true, name: 'some name...', url: 'some url...' } },\n { hosts: [/* ... */], config: { indexable: true, name: 'some name...', url: 'some url...' } },\n { hosts: [/* ... */], config: { indexable: true, name: 'some name...', url: 'some url...' } },\n { hosts: [/* ... */], config: { indexable: true, name: 'some name...', url: 'some url...' } },\n { hosts: [/* ... */], config: { indexable: true, name: 'some name...', url: 'some url...' } },\n // Dev\n { hosts: [/* ... */], config: { indexable: false, name: 'some name Dev', url: 'some url...' } },\n { hosts: [/* ... */], config: { indexable: false, name: 'some name Dev', url: 'some url...' } },\n { hosts: [/* ... */], config: { indexable: false, name: 'some name Dev', url: 'some url...' } },\n { hosts: [/* ... */], config: { indexable: false, name: 'some name Dev', url: 'some url...' } },\n { hosts: [/* ... */], config: { indexable: false, name: 'some name Dev', url: 'some url...' } },\n { hosts: [/* ... */], config: { indexable: false, name: 'some name Dev', url: 'some url...' } },\n { hosts: [/* ... */], config: { indexable: false, name: 'some name Dev', url: 'some url...' } }\n ]\n},\n// ...\n i18n: {\n vueI18n: 'i18n.config.ts',\n strategy: 'prefix',\n baseUrl: 'https://somedomain.com',\n defaultLocale: 'es',\n detectBrowserLanguage: {\n useCookie: true,\n cookieKey: 'i18n_redirected',\n redirectOn: 'root'\n },\n multiDomainLocales: true,\n locales: [\n {\n code: 'en',\n file: 'en.json',\n domains,\n language: 'en-US',\n name: 'English',\n defaultForDomains: englishDomains\n },\n {\n code: 'es',\n file: 'es.json',\n domains,\n language: 'es-AR',\n name: 'Español',\n defaultForDomains: spanishDomains\n },\n {\n code: 'pt',\n file: 'pt.json',\n domains,\n language: 'pt-PT',\n name: 'Português',\n defaultForDomains: portugueseDomains\n }\n ],\n lazy: true\n },\n});\n// ...\n```\n\n```typescript\n// app.vue\n//...\nconst head = useLocaleHead({\n dir: true,\n key: 'id',\n seo: true\n});\n\nuseHead({\n htmlAttrs: {\n lang: head.value.htmlAttrs.lang,\n dir: head.value.htmlAttrs.dir\n },\n link: head.link,\n meta: head.meta\n});\n//...\n```",[],3635,"SEO and Multiple Domains","2025-05-22T19:19:28Z","https://github.com/nuxt-modules/i18n/issues/3635",0.7056348,{"description":3210,"labels":3211,"number":3213,"owner":3176,"repository":3177,"state":3178,"title":3214,"updated_at":3215,"url":3216,"score":3217},"### Describe the feature\n\n#### Background\n\nThe `nuxt-i18n` module provides a `strategy` option with the following values:\n\n* `no_prefix`\n* `prefix_except_default`\n* `prefix`\n* `prefix_and_default`\n\nref: https://i18n.nuxtjs.org/docs/guide\n\nThe `no_prefix` strategy disables the use of locale prefixes (e.g., `/en`, `/ja`) in the URL.\n\nAdditionally, `nuxt-i18n` has a feature that automatically detects the locale based on the URL. For example, accessing a URL like `/en/*` will switch the locale to `en`.\n\nHowever, when the `no_prefix` strategy is used, this automatic locale detection based on the pathname is disabled, as the pathname does not contain locale information.\nref: https://github.com/nuxt-modules/i18n/blob/25b900a9f5d509ac1081716a3a7d5c1d22edbd71/src/runtime/utils.ts#L247-L249\n\nThis behavior seems logical given the absence of locale information in the URL. However, it causes issues when building multilingual documentation sites using `nuxt/content`.\n\n##### Example Use Case:\n\nSuppose we have the following markdown files for multilingual content:\n\n* `docs/en/about.md`\n* `docs/ja/about.md`\n\nIn this case, we want to access `/en/about` and `/ja/about` to display the corresponding localized content. However, since the locale detection from pathname is disabled with `no_prefix`, the locale is not correctly detected based on the URL.\n\nAs a result, during SSG (Static Site Generation), both `/en/about` and `/ja/about` will be generated using the language setting of the build machine, causing incorrect locale assignments.\n\ne.g. https://github.com/odan-sandbox/nuxt-content-and-i18n-no_prefix-example\n\n| http://localhost:3000/en/about | http://localhost:3000/ja/about |\n|-|-|\n|\u003Cimg width=\"335\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/140618e5-a2cd-46cb-8678-bd615b02bfa1\" />|\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).",[3212],{"name":3173,"color":3174},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.7083263,{"description":3219,"labels":3220,"number":3224,"owner":3176,"repository":3177,"state":3178,"title":3225,"updated_at":3226,"url":3227,"score":3228},"### Environment\n\n* Nuxt: `^3.x`\n* @nuxtjs/i18n: `^9.x`\n* Package manager: `pnpm`\n* Node: `>=18`\n* OS: macOS\n\n### Reproduction\n\n\n#### 🧩 What I'm trying to do\n\nI want to **dynamically disable translation for some pages**, such as `/admin` or any route matching a certain pattern, by injecting into the `i18n.pages` config like this:\n\n```ts\ni18n: {\n customRoutes: 'config',\n pages: {\n 'admin': false\n }\n}\n```\n\nBut I want to do this **dynamically from another Nuxt module**, based on logic like:\n\n* Whether route path starts with `/admin`\n* Whether the file name includes certain keywords\n* Optional user-defined exclude rule function\n\n---\n\n#### 📌 Problem\n\nThe `pages:extend` hook gives access to all generated Nuxt pages, and I can detect which pages I want to exclude, then inject:\n\n```ts\nnuxt.options.i18n.pages = {\n ...nuxt.options.i18n.pages,\n ...detectedPagesToExclude\n}\n```\n\nHowever, **`@nuxtjs/i18n` appears to snapshot the config too early**, likely before `pages:extend` runs, and generates `i18n-options.mjs` using an internal `ctx.options`, so my dynamic changes to `nuxt.options.i18n.pages` do **not reflect** in the generated options.\n\n---\n\n### Describe the bug\n\n\n#### ❓Question\n\nIs there an **official or recommended way** to dynamically inject/disable page translation settings (`customRoutes: 'config'` + `pages`) at runtime or module time?\n\nMore specifically:\n\n* Can you expose a Nuxt hook like `i18n:extendPagesConfig(pages)` before generating `i18n-options.mjs`?\n* Or is there a safe way to hook into `ctx.options.pages` in a custom module?\n* Or should we write a wrapper module that overrides the `i18n` module setup?\n\n---\n\n#### 🧪 What I tried\n\n```ts\nnuxt.hook('pages:extend', pages => {\n for (const page of pages) {\n if (page.path.startsWith('/admin') && page.name) {\n nuxt.options.i18n.pages[page.name] = false\n }\n }\n})\n```\n\nBut this doesn't reflect in the generated `.nuxt/i18n-options.mjs` file.\n\n---\n\n#### 🙏 Feature request?\n\nCould you consider adding a hook like:\n\n```ts\nnuxt.hook('i18n:extendPagesConfig', (pages: NuxtPage[], currentConfig: Record\u003Cstring, any>) => {\n // modify and return updated pages config\n})\n```\n\nSo that other modules (like `i18n-exclude`) can safely hook in and modify translation strategy for specific routes?\n\n---\n\nLet me know if there's already a supported way to do this.\n\nThanks a lot for the amazing work on `@nuxtjs/i18n` 🙌\n\n\n\n### Additional context\n\n_No response_\n\n### Logs\n\n```shell\n\n```",[3221],{"name":3222,"color":3223},"feature request","ffbb00",3716,"Allow modules to modify route localization","2025-07-03T17:06:13Z","https://github.com/nuxt-modules/i18n/issues/3716",0.71068174,{"description":3230,"labels":3231,"number":3236,"owner":3176,"repository":3177,"state":3178,"title":3237,"updated_at":3238,"url":3239,"score":3240},"### Environment\n\nnpx nuxi info\nWorking directory: C:/Users/senem/MEM22 nuxi 01:42:27\nNuxt project info: (copied to clipboard) nuxi 01:42:27\n\n------------------------------\n- Operating System: Windows_NT\n- Node Version: v20.19.4\n- Nuxt Version: 3.17.7\n- CLI Version: 3.26.2\n- Nitro Version: 2.12.3\n- Package Manager: npm@10.8.2\n- Builder: -\n- User Config: compatibilityDate, devtools, ssr, app, pages, modules, css, postcss, supabase, vite, sourcemap, routeRules, nitro, site, sitemap, plugins, headers, i18n\n- Runtime Modules: @nuxtjs/i18n@10.0.3, @nuxt/eslint@1.6.0, @nuxt/icon@1.15.0, @nuxt/image@1.10.0, @nuxtjs/tailwindcss@6.14.0, @nuxtjs/supabase@1.5.3, @nuxtjs/sitemap@7.4.3\n- Build Modules: -\n------------------------------\n\n👉 Report an issue: https://github.com/nuxt/nuxt/issues/new?template=bug-report.yml\n👉 Suggest an improvement: https://github.com/nuxt/nuxt/discussions/new\n👉 Read documentation: https://nuxt.com\n\n### Reproduction\n\nhttps://github.com/EnsMsgLu/nuxt-i18n-issue\n\n### Describe the bug\n\nit doesnt working with subdomains \n\n\n\n### Additional context\n\n_No response_\n\n### Logs\n\n```shell\n\n```",[3232,3233],{"name":3173,"color":3174},{"name":3234,"color":3235},"need reproduction","CD234A",3767,"Its not working Home page on Subdomain","2025-07-31T10:28:33Z","https://github.com/nuxt-modules/i18n/issues/3767",0.71168804,{"description":3242,"labels":3243,"number":3247,"owner":3176,"repository":3177,"state":3248,"title":3249,"updated_at":3250,"url":3251,"score":3252},"### Environment\n\n- Operating System: `Darwin`\r\n- Node Version: `v20.9.0`\r\n- Nuxt Version: `3.11.2`\r\n- CLI Version: `3.11.1`\r\n- Nitro Version: `2.9.6`\r\n- Package Manager: `pnpm@9.0.4`\r\n- Builder: `-`\r\n- User Config: `devtools`, `modules`, `i18n`\r\n- Runtime Modules: `@nuxtjs/i18n@8.3.0`\r\n- Build Modules: `-`\r\n\n\n### Reproduction\n\nhttps://stackblitz.com/edit/nuxt-starter-dx8kkg?file=nuxt.config.ts\r\n\r\nThe reproduction will not work on stackblitz due to using the custom domains. Please clone it & test locally.\n\n### Describe the bug\n\nThe documentation [says](https://i18n.nuxtjs.org/docs/guide/different-domains#runtime-environment-variables):\r\n> Alternatively, to avoid the need for multiple builds, the locale domains can be overridden via runtime environment variables. The variable name should follow the format NUXT_PUBLIC_I18N_LOCALES_{locale code}_DOMAIN\r\n\r\nHowever, based on my testing, this doesn't seem to work. The domains provided through `.env` **do** appear in the lang switcher (result of `switchLocalePath()` call), however, they don't switch the locale.\r\n\r\nI'm not sure if I'm just doing something wrong or if this is a bug, but regardless, this issue either needs fixing or the documentation needs to be updated. I'd be happy to update the docs if necessary.\r\n\n\n### Additional context\n\n_No response_\n\n### Logs\n\n_No response_",[3244],{"name":3245,"color":3246},"scope: domains","fbca04",2931,"closed","Overridden locale domains don't switch locale","2025-08-21T22:56:42Z","https://github.com/nuxt-modules/i18n/issues/2931",0.67379606,{"description":3254,"labels":3255,"number":3257,"owner":3176,"repository":3177,"state":3248,"title":3258,"updated_at":3259,"url":3260,"score":3261},"### Describe the feature\n\nNuxt 4 moved almost all folders into the app dir.\nWhen adding i18n I would expect the folder to be there as well.\n\nTo manually do this for nuxt4 change the restructureDir:\n```\nexport default defineNuxtConfig({\n i18n: {\n restructureDir: 'app/i18n',\n }\n});\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).",[3256],{"name":3173,"color":3174},3764,"[Feature Request] Change default i18n dir location for Nuxt 4","2025-07-30T07:56:53Z","https://github.com/nuxt-modules/i18n/issues/3764",0.6797758,{"description":3263,"labels":3264,"number":3265,"owner":3176,"repository":3177,"state":3248,"title":3266,"updated_at":3267,"url":3268,"score":3269},"In order for the runtime config merging to work properly, there must be an entry for each locale in `domainLocales`. This can be done in the nuxt.config like so:\n\n\n```ts\ndefineNuxtConfig({\n runtimeConfig: {\n public: i18n: {\n domainLocales: {\n en: { domain: '' },\n de: { domain: '' }\n }\n }\n }\n})\n```\n\nBut to make this easier for users, nuxt-i18n could pre-configure these values based on `locales` module option.",[],3694,"Pre-populate `domainLocales` based on module configuration","2025-06-25T21:20:58Z","https://github.com/nuxt-modules/i18n/issues/3694",0.68037444,["Reactive",3271],{},["Set"],["ShallowReactive",3274],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$ffR7uCE4M5Iuw0mDpjS8gSFOp88wECvWa2PixZwLAZb4":-1},"/nuxt-modules/i18n/3810"]