\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).",[3195],{"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.6889462,{"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\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).",[3204],{"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.6988035,{"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### 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).",[3213],{"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.70317143,{"description":3220,"labels":3221,"number":3234,"owner":3176,"repository":3177,"state":3178,"title":3235,"updated_at":3236,"url":3237,"score":3238},"### Environment\n\n•\tNuxt: 4.x\n•\t@nuxtjs/i18n: 10.x\n•\tNode.js: 20+\n•\tOS: macos\n•\tBrowser:chrome\n\n### Reproduction\n\n1.\tCreate a fresh Nuxt 4 project\n2.\tInstall @nuxtjs/i18n@^10\n3.\tMinimal nuxt.config.ts:\n```\nexport default defineNuxtConfig({\n i18n: {\n strategy: 'prefix',\n defaultLocale: 'en-US',\n locales: [\n { code: 'en-US', name: 'English' },\n { code: 'zh-CN', name: '简体中文' }\n ],\n detectBrowserLanguage: false,\n skipSettingLocaleOnNavigate: true,\n experimental: {\n preload: false,\n stripMessagesPayload: false\n }\n }\n})\n```\n4.\tRun npm run dev and open the homepage — you’ll see two logs for the same locale.\n\nCall stacks from first page load:\n\nCall 1 (App initialization)\n```\nloadMessagesFromClient (…/node_modules/@nuxtjs/i18n/dist/runtime/utils/load-messages.mjs:XX)\nloadAndSetLocale (…/node_modules/@nuxtjs/i18n/dist/runtime/utils/locale.mjs:XX)\nsetup (route-locale-detect.client.mjs:12)\napplyPlugins (…/node_modules/nuxt/dist/app/entry.mjs:XX)\ninitApp (…/node_modules/nuxt/dist/app/entry.mjs:XX)\n```\nCall 2 (Initial navigation / route normalization)\n```\nloadMessagesFromClient (…/node_modules/@nuxtjs/i18n/dist/runtime/utils/load-messages.mjs:XX)\nloadAndSetLocale (…/node_modules/@nuxtjs/i18n/dist/runtime/utils/locale.mjs:XX)\nsetup (route-locale-detect.client.mjs:13)\nrouter.replace / pushWithRedirect (…/node_modules/vue-router/dist/vue-router.mjs:XX)\n```\n\n### Describe the bug\n\nWhen using @nuxtjs/i18n v10 with Nuxt 4, loadMessagesFromClient is executed twice on the client during the first page load — once during app initialization and once again after the initial navigation normalization.\nEven with minimal config, browser language detection disabled, and skipSettingLocaleOnNavigate enabled, this still happens.\nFor runtime-loaded translations (e.g., from a remote API), the second internal load overwrites messages from the first, leading to inconsistent output.\n\n### Additional context\n\n•\tTried disabling detectBrowserLanguage and enabling skipSettingLocaleOnNavigate\n•\tNo custom route middlewares or manual setLocale calls\n•\tToggling experimental.preload had no effect\n•\tqueueMicrotask cannot guarantee correct overwrite order if local message files are large; only setTimeout(0) reliably delays after the second call, which is not ideal\n•\tLikely cause: route-locale-detect client plugin calls loadAndSetLocale both during app initialization and after initial navigation.\n•\tSuggestion: Provide an option to skip the second call in client mode, or internally cache per-locale loader results so repeated calls for the same locale return the same Promise instead of overwriting.\n\n### Logs\n\n```shell\n\n```",[3222,3225,3228,3231],{"name":3223,"color":3224},"bug 🐛","ee0701",{"name":3226,"color":3227},"performance","006b75",{"name":3229,"color":3230},"scope: dynamic resources","38FB12",{"name":3232,"color":3233},"scope: runtime","84b6eb",3773,"Messages fetched and merged twice on client initialization","2025-09-11T16:11:22Z","https://github.com/nuxt-modules/i18n/issues/3773",0.70323825,{"description":3240,"labels":3241,"number":3243,"owner":3176,"repository":3177,"state":3178,"title":3244,"updated_at":3245,"url":3246,"score":3247},"### Environment\n\n------------------------------\n- Operating System: Windows_NT\n- Node Version: v22.17.0\n- Nuxt Version: 4.1.2\n- CLI Version: 3.28.0\n- Nitro Version: 2.12.6\n- Package Manager: pnpm@9.15.9\n- Builder: -\n- User Config: compatibilityDate, devtools, typescript, runtimeConfig, imports, hooks, nitro, routeRules, modules, app, i18n, linkChecker, seo, site, robots, sitemap, ogImage, pwa, css, build, experimental, devServer, vite\n- Runtime Modules: @nuxt/eslint@1.9.0, @nuxtjs/i18n@10.1.0, @vueuse/nuxt@13.9.0, @nuxtjs/seo@3.1.0, @pinia/nuxt@0.11.2, ./modules/pwa-i18n, @vite-pwa/nuxt@1.0.4\n- Build Modules: -\n------------------------------\n\n### Reproduction\n\nNot sure about the reason. On StackBlitz, `npm i` throws the error `ERROR Cannot find native binding. npm has a bug related to optional dependencies (https://github.com/npm/cli/issues/4828)`. On CodeSandbox, it gets stuck at `Resuming MicroVM... Still booting, please wait`.\n\n### Describe the bug\n\nmy config: ssg\n\n```javascript\nstrategy: \"prefix_except_default\",\ndetectBrowserLanguage: {\n useCookie: true,\n cookieKey: \"app-locale\",\n redirectOn: \"root\",\n alwaysRedirect: false,\n},\n```\n\nI have a page that users can share via its link.\nTo prevent other users from being forced to switch languages when visiting this URL,\nI tried adding a query parameter and then checking for its presence in the `i18n:beforeLocaleSwitch` hook when the page is accessed.\nThe idea was to prioritize using the user’s existing cookie language to avoid forcing a language change.\n\nHowever, in my tests I found that when directly opening that URL, by the time this hook is triggered, the browser’s cookie has already been updated to the language from the URL, so I don’t have a chance to retrieve the user’s previously set language.\n\n---\n\n- In addition, if `redirectOn` could be configured as a function, wouldn’t it be much easier to implement my requirement?\n\n- The comment for the alwaysRedirect option in the code says: `Always redirect to the detected locale, not just on first visit`, which doesn’t match the documentation for [alwaysRedirect](https://i18n.nuxtjs.org/docs/api/options#alwaysredirect). This initially confused me about its relationship with `redirectOn: \"all\"`.\nMy current understanding is(is this right?):\n\n - alwaysRedirect: whether to always force a redirect to the language stored in the cookie.\n\n - redirectOn: under what circumstances to redirect to the language detected by detectBrowserLanguage (including the language in the route? and with the route language having higher priority?).\n\n\n### Additional context\n\n_No response_\n\n### Logs\n\n```shell\n\n```",[3242],{"name":3173,"color":3174},3819,"cookie was modified before the i18n:beforeLocaleSwitch hook was triggered","2025-09-14T09:08:04Z","https://github.com/nuxt-modules/i18n/issues/3819",0.7037803,{"description":3249,"labels":3250,"number":3254,"owner":3176,"repository":3177,"state":3255,"title":3256,"updated_at":3257,"url":3258,"score":3259},"### Describe the feature\n\n\r\nI have a project that heavily relies on several modules injecting pages. It is used to create websites for different countries by feeding country-config into nuxt-config. As a result, each module may inject a different set of pages based on the configuration.\r\n\r\nCurrently, I have found no way to define custom routes for pages injected through modules. \r\nI cannot use `customRoutes: 'page'` because it would require modifying all modules whenever we release the website for a new country. \r\nAlso, I cannot use `customRoutes: 'config'` since it cannot resolve AnalyzedNuxtPageMeta for injected pages.\r\n\r\nI wrote some details in discussions few days ago:\r\nhttps://github.com/nuxt-modules/i18n/discussions/2398\r\n\r\nI'd like to have an ability to define customRoutes based on route name instead of fs-like path. \r\nSo next 2 blocks will give same result:\r\n\r\n```js\r\ni18n: {\r\n customRoutes: 'config',\r\n pages: {\r\n 'my/[param]/page': {\r\n en: 'my/[param]/page',\r\n de: 'mein/[param]/seite'\r\n }\r\n }\r\n}\r\n```\r\n\r\n```js\r\ni18n: {\r\n customRoutes: 'named-config',\r\n pages: {\r\n 'my-param-page': { \r\n en: 'my/:param()/page',\r\n de: 'mein/:param()/seite'\r\n }\r\n }\r\n}\r\n```\r\n\r\n\r\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).",[3251],{"name":3252,"color":3253},"scope: routing","21CD73",2407,"closed","Add one more way to define custom routes. 'named-config'","2025-05-23T09:36:57Z","https://github.com/nuxt-modules/i18n/issues/2407",0.6464828,{"description":3261,"labels":3262,"number":3270,"owner":3176,"repository":3177,"state":3255,"title":3271,"updated_at":3272,"url":3273,"score":3274},"### 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_",[3263,3266,3267],{"name":3264,"color":3265},"🍰 p2-nice-to-have","0e8a16",{"name":3252,"color":3253},{"name":3268,"color":3269},"PR Welcome","40922A",2033,"Custom routes issue with switchLocalePath","2025-05-22T23:35:14Z","https://github.com/nuxt-modules/i18n/issues/2033",0.6669788,{"description":3276,"labels":3277,"number":3282,"owner":3176,"repository":3177,"state":3255,"title":3283,"updated_at":3284,"url":3285,"score":3286},"### Describe the feature\n\nDependencies:\n```\n\"nuxt\": \"^4.0.3\",\n@nuxtjs/i18n\": \"^10.0.6\",\n```\n\nWe are unable to translate the root segment of dynamic routes during SSG, specifically when defining pages with a structure like this:\n\n```\napp\n├── pages\n│ └── something # not able to translate this part\n│ └── [slug].vue # able to translate this part\n```\n\nWe passed translated routes to `i18n.pages` property in `nuxt.config.ts` and pre-rendering translated routes with nitro, however, we faced an issue where the dynamic page root part cannot be translated.\n\nFor example desired result should be:\n**English**: /pages/something/some-slug\n**Translated**: /pages/something-translated/some-slug-translation\n\nActual result:\nWhen running nuxt generate we receive 404 error that /something-translated/some-slug-translation is not found\n\nCouldn’t find related issues. We are seeking guidance on whether the translation of dynamic page root part is a supported feature within the current Nuxt.js and @nuxtjs/i18n ecosystem, and if so, how to properly configure it to achieve the desired translated URL structure during SSG. Thanks!\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).",[3278,3279],{"name":3173,"color":3174},{"name":3280,"color":3281},"need reproduction","CD234A",3816,"Inability to translate dynamic page root part during SSG","2025-09-17T14:07:01Z","https://github.com/nuxt-modules/i18n/issues/3816",0.6696935,["Reactive",3288],{},["Set"],["ShallowReactive",3291],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fXImUcXutu_fyJqJDYU9N0O9z-59F4lfQS2ak9iYzwm4":-1},"/nuxt-modules/i18n/3716"]