\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.6840288,{"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\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).",[3195],{"name":3173,"color":3174},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.6998804,{"description":3202,"labels":3203,"number":3205,"owner":3176,"repository":3177,"state":3178,"title":3206,"updated_at":3207,"url":3208,"score":3209},"### 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).",[3204],{"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.7065822,{"description":3211,"labels":3212,"number":3214,"owner":3176,"repository":3177,"state":3178,"title":3215,"updated_at":3216,"url":3217,"score":3218},"### 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).",[3213],{"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.70891786,{"description":3220,"labels":3221,"number":3223,"owner":3176,"repository":3177,"state":3178,"title":3224,"updated_at":3225,"url":3226,"score":3227},"### 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```",[3222],{"name":3173,"color":3174},3619,"Locale detection not working with `no_prefix` strategy","2025-05-19T06:13:27Z","https://github.com/nuxt-modules/i18n/issues/3619",0.7105235,{"description":3229,"labels":3230,"number":3232,"owner":3176,"repository":3177,"state":3178,"title":3233,"updated_at":3234,"url":3235,"score":3236},"### Describe the feature\n\nHi,\nBasically, I have a root `schedule.vue` page which is this route `/en/schedule`.\n\n\u003Cimg width=\"319\" height=\"128\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/03ec9ac3-c1ce-409c-869e-eb48888e241c\" />\n\nThe schedule page has nested \"child\" routes, which are displayed as \"tabs\" using `\u003CNuxtChild />`.\n\n\u003Cimg width=\"1288\" height=\"664\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/3f1a9bac-7094-4cd6-b5a8-3b6f8d26069f\" />\n\nWhen I visit the schedule route, I want to redirected to `schedule/[day].vue`, with \"day\" param set as \"1\", which would display the schedule for the first day of the event `/en/schedule/1`.\n\nI had to create a custom middleware because it was not supported.\n```js\n// schedule.vue\n\ndefinePageMeta({\n localeRedirect: {\n name: 'schedule-day',\n params: { day: 1 },\n },\n i18n: {\n paths: {\n fr: '/programmation',\n en: '/schedule',\n },\n },\n});\n```\n\n```js\n// localeRedirect.global.ts\n\nexport default defineNuxtRouteMiddleware((to) => {\n const localePath = useLocalePath();\n if (to.meta.localeRedirect && to.matched.length === 1 && !to.redirectedFrom) {\n return navigateTo(localePath(to.meta.localeRedirect));\n }\n});\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).",[3231],{"name":3173,"color":3174},3801,"Add i18n support to `redirect` inside `definePageMeta`","2025-08-31T09:50:36Z","https://github.com/nuxt-modules/i18n/issues/3801",0.7125647,{"description":3238,"labels":3239,"number":3241,"owner":3176,"repository":3177,"state":3178,"title":3242,"updated_at":3243,"url":3244,"score":3245},"### Environment\n\nmacOS 26\n\"nuxt\": \"^4.1.2\",\n\"@nuxtjs/i18n\": \"^10.1.0\",\n\"typescript\": \"^5.9.3\",\n\nlatest vsCode\n\nhereafter is an extract of my nuxtConfig :\n` i18n: {\n defaultLocale: 'fr',\n locales: [\n { code: 'fr', name: 'Français', file: 'fr.json' },\n { code: 'en', name: 'English', file: 'en.json' },\n ],\n strategy: 'prefix_except_default',\n detectBrowserLanguage: {\n useCookie: true,\n cookieKey: 'i18n_redirected',\n redirectOn: 'root',\n },\n },`\n\n### Reproduction\n\nconst { locales } = useI18n();\n\n### Describe the bug\n\nAccording to typeScript locales property is not exported by usei18n composable :\nProperty 'locales' does not exist on type 'Composer\u003C{ fr: LocaleMessage\u003CVueMessageType>; en: LocaleMessage\u003CVueMessageType>; }, { fr: DateTimeFormat; en: DateTimeFormat; }, { ...; }, string, \"fr\" | \"en\", \"fr\" | \"en\">'.ts-plugin(2339)\n\n\u003Cimg width=\"1553\" height=\"273\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/4028cf40-4dd1-4fd3-bde3-12c460c5cd73\" />\n\n\n### Additional context\n\nAt runtime the locales array is properly available see console log :\n\n\u003Cimg width=\"574\" height=\"98\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/a567197b-ed0e-477c-a908-3ce9b0e47c7d\" />\n\n### Logs\n\n```shell\n\n```",[3240],{"name":3173,"color":3174},3834,"TS error: According to typeScript locales property is not exported by usei18n composable","2025-10-04T07:35:11Z","https://github.com/nuxt-modules/i18n/issues/3834",0.7166989,{"description":3247,"labels":3248,"number":3252,"owner":3176,"repository":3177,"state":3253,"title":3254,"updated_at":3255,"url":3256,"score":3257},"## 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",[3249],{"name":3250,"color":3251},"need reproduction","CD234A",3752,"closed","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.67678756,{"description":3259,"labels":3260,"number":3262,"owner":3176,"repository":3177,"state":3253,"title":3263,"updated_at":3264,"url":3265,"score":3266},"### Environment\n\n**Module version:** \n`@nuxtjs/i18n` version: `^9.4.0`\n\n**Nuxt version:** \n`Nuxt 3.16.2`\n\n### ❗ Problem\n\nAfter building CI/CD pipeline of project, the generated `nuxt.i18n.options.mjs` includes **absolute paths** to the locale files, for example:\n\n```js\n{\n path: \"/home/gitlab-runner/builds/QEWN8sP-g/0/client/i18n/locales/ru/errors.json\",\n cache: undefined\n}\n```\n\n### Reproduction\n\nConfigure @nuxtjs/i18n in nuxt.config.ts:\n\n```\ni18n: {\n locales: [\n { code: 'ru', file: 'ru/errors.json' },\n { code: 'ro', file: 'ro/errors.json' },\n ],\n langDir: 'i18n/locales/',\n defaultLocale: 'ru',\n}\n```\n\nRun nuxt build\n\nInspect the contents of .output/public/_nuxt/ or nuxt.i18n.options.mjs\n\nNotice absolute paths included in the files array\n\n💡 Workarounds tried\n\n✅ fullInstall: false → no effect\n\n✅ Using relative langDir and file values → still resolves to absolute paths\n\n✅ Changing build environment → problem persists\n\n### Describe the bug\n\nPlease avoid emitting absolute file paths into the build output. Relative or virtualized paths would ensure cleaner builds, better security, and fewer environment-specific artifacts.\n\nLet me know if you need a minimal reproduction repo or additional logs.\n\n### Additional context\n\n_No response_\n\n### Logs\n\n```shell\n\n```",[3261],{"name":3173,"color":3174},3742,"Absolute file paths included in production bundle","2025-07-21T08:55:25Z","https://github.com/nuxt-modules/i18n/issues/3742",0.69252163,["Reactive",3268],{},["Set"],["ShallowReactive",3271],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fhNfX5gbnjhKrTSKIkDAGTx9EUnNIzcK771-LTeq8zPE":-1},"/nuxt-modules/i18n/3593"]