\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).",[3197],{"name":3175,"color":3176},3801,"Add i18n support to `redirect` inside `definePageMeta`","2025-08-31T09:50:36Z","https://github.com/nuxt-modules/i18n/issues/3801",0.6974677,{"description":3204,"labels":3205,"number":3207,"owner":3178,"repository":3179,"state":3180,"title":3208,"updated_at":3209,"url":3210,"score":3211},"### Describe the feature\n\nHello developers,\n\nI noticed that the route prefix in the Nitro configuration is hardcoded as /_i18n/. Would it be possible to provide a configuration option to customize this prefix?\n\u003Cimg width=\"3524\" height=\"1082\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/281f9764-234f-4241-981c-8deb393ffccc\" />\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).",[3206],{"name":3175,"color":3176},3822,"Configurable Server Route Prefix for i18n Messages Endpoint","2025-09-17T09:19:34Z","https://github.com/nuxt-modules/i18n/issues/3822",0.69769984,{"description":3213,"labels":3214,"number":3216,"owner":3178,"repository":3179,"state":3180,"title":3217,"updated_at":3218,"url":3219,"score":3220},"### Describe the feature\n\nHi,\n\nFirst of all, this request is not about custom route paths in Nuxt i18n. It is about Nuxt's [custom routes](https://nuxt.com/docs/4.x/guide/recipes/custom-routing) defined in router.config.js.\nNuxt's file-system routing is more of a hype than actual practicality. Most big commercial apps prefer to have a file specifying all routes along with their names, paths, components, middleware, etc. For that reason, Nuxt has exposed a way to define routes in a router.config.js file.\nHowever, I find it frustrating that I18n still doesn't support automatic prefixing of routes, defined in router.config.js, and rather relies solely on file-system routing. Having support for custom routes would allow bigger applications to make use of all features of I18n module without having to reinvent prefixing and automatic path generation.\n\nI really look forward to seeing this feature and utilizing the module to the fullest.\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).",[3215],{"name":3175,"color":3176},3770,"Add support for Nuxt custom routing","2025-08-05T06:36:57Z","https://github.com/nuxt-modules/i18n/issues/3770",0.6984038,{"description":3222,"labels":3223,"number":3228,"owner":3178,"repository":3179,"state":3180,"title":3229,"updated_at":3230,"url":3231,"score":3232},"### 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```",[3224,3225],{"name":3175,"color":3176},{"name":3226,"color":3227},"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.702941,{"description":3234,"labels":3235,"number":3237,"owner":3178,"repository":3179,"state":3180,"title":3238,"updated_at":3239,"url":3240,"score":3241},"### Describe the feature\n\nCurrently, the files property in the locales configuration only supports an array of file paths. I would like to propose supporting a prefix option for each file to namespace its translations when loaded.\n```\ni18n: {\n locales: [\n {\n code: \"en\",\n name: \"English\",\n files: [\n { path: \"en/common.json\", prefix: \"common\" },\n { path: \"en/checkout.json\", prefix: \"checkout\" },\n { path: \"en/order.json\", prefix: \"order\" }\n ]\n }\n ]\n}\n```\nWith this configuration, the keys inside en/checkout.json would be accessible via t('checkout.key'), while en/common.json would be t('common.key'), and so on.\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).",[3236],{"name":3175,"color":3176},3593,"Support for file prefix in locales.files config","2025-05-11T07:15:31Z","https://github.com/nuxt-modules/i18n/issues/3593",0.7116504,{"description":3243,"labels":3244,"number":3246,"owner":3178,"repository":3179,"state":3247,"title":3248,"updated_at":3249,"url":3250,"score":3251},"### Describe the feature\n\nIt took me hours of fiddling around, to find out that in order to setup language fallback (in case of missing translation in the current language), I have to create `frontend/i18n/i18n.config.ts` with the following content:\n```\nexport default defineI18nConfig(() => {\n return {\n fallbackLocale: 'en-US',\n }\n})\n```\nNote that AI tools usually suggest adding configuration entries in `nuxt.config.ts`, and usually these fields are deprecated fields. My AI tools got lost completely while trying to resolve this.\nI believe this is a crucial information for implementers. Please add it to the project's guide.\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).",[3245],{"name":3175,"color":3176},3596,"closed","Doc: add clear instructions how to set language fallback","2025-05-12T14:17:43Z","https://github.com/nuxt-modules/i18n/issues/3596",0.6835417,{"description":3253,"labels":3254,"number":3256,"owner":3178,"repository":3179,"state":3247,"title":3257,"updated_at":3258,"url":3259,"score":3260},"### Environment\n\n``` \n- Operating System: Linux\n- Node Version: v20.19.2\n- Nuxt Version: 3.17.3\n- CLI Version: 3.25.1\n- Nitro Version: 2.11.12\n- Package Manager: pnpm@9.9.0\n- Builder: -\n- User Config: -\n- Runtime Modules: -\n- Build Modules: -\n```\n\n### Reproduction\n\nThe codebase is in a **monorepo** structured as:\n\n```\n/\n├── backend/\n├── frontend/\n│ ├── nuxt.config.ts\n│ ├── app/i18n/locales/fr-CH.ts\n```\n\nThe `docker-compose.yml` mounts the frontend code like so:\n\n```yaml\nservices:\n frontend:\n build:\n context: ./frontend\n volumes:\n - ./frontend:/app\n```\n\nThe `Dockerfile` for the frontend uses:\n\n```dockerfile\nWORKDIR /app\n```\n\nIn `nuxt.config.ts`, the following i18n configuration is used:\n\n```ts\ni18n: {\n langDir: 'app/i18n/locales',\n locales: [\n { code: 'fr-CH', file: 'fr-CH.ts' }\n ],\n defaultLocale: 'fr-CH',\n lazy: true\n}\n```\n\nBecause of the `WORKDIR /app` and the volume mount, the file is located at:\n\n```\n/app/app/i18n/locales/fr-CH.ts\n```\n\nHowever, Nuxt i18n tries to resolve it as:\n\n```\n/app/i18n/locales/fr-CH.ts\n```\n\nWhich results in:\n\n```\nCannot restart nuxt: ENOENT: no such file or directory, open '/app/i18n/locales/fr-CH.ts'\n```\n\n### Describe the bug\n\nWhen using Docker with `WORKDIR /app` and mounting the local folder to `/app`, Nuxt resolves `langDir` relative to the container's CWD (`/app`), but does not account for the case where code is in a subfolder inside that mount.\n\nIf your file is located at `/app/app/i18n/locales/fr-CH.ts`, and you set:\n\n```ts\ni18n: {\n langDir: 'i18n/locales',\n locales: [{ code: 'fr-CH', file: 'fr-CH.ts' }],\n defaultLocale: 'fr-CH',\n lazy: true\n}\n```\n\nThen Nuxt throws:\n\n```\nCannot restart nuxt: ENOENT: no such file or directory, open '/app/i18n/locales/fr-CH.ts'\n```\n\nEven though the actual file is present at `/app/app/i18n/locales/fr-CH.ts`.\n\n### Additional context\n\n**Additional context**\n\n**Root cause:** path resolution is based on `process.cwd()` in the container (Docker `WORKDIR`) and doesn't match the actual file location when mounted.\n\n**Workaround:** use a different `WORKDIR` (e.g. `/nuxt`) and adjust the volume mount accordingly:\n\n```dockerfile\n# Dockerfile\nWORKDIR /nuxt\n```\n\n```yaml\n# docker-compose.yml\nvolumes:\n - ./frontend:/nuxt\n```\n\nThis fixes the issue and resolves the path as expected.\n\n---\n\n### Logs\n\n```shell\nCannot restart nuxt: ENOENT: no such file or directory, open '/app/i18n/locales/fr-CH.ts'\n\n at readFileSync (node:fs:449:20)\n at getLocaleType (node_modules/@nuxtjs/i18n/dist/module.mjs:201:34)\n at resolveLocales (node_modules/@nuxtjs/i18n/dist/module.mjs:181:20)\n```",[3255],{"name":3175,"color":3176},3620,"Incorrect `langDir` resolution when using Docker with WORKDIR set to `/app`","2025-05-19T07:09:08Z","https://github.com/nuxt-modules/i18n/issues/3620",0.68736315,{"description":3262,"labels":3263,"number":3264,"owner":3178,"repository":3179,"state":3247,"title":3265,"updated_at":3266,"url":3267,"score":3268},"We are using modules folder within our nuxt project to separate certain parts of our app, Inside of it we have few pages and layouts\nStructure looks like this\n```\nmodules\n shop\n pages\n checkout\n index.vue \n layouts\n checkout.vue \n``` \n\nand issue is that after adding i18n most of website works fine, but checkout/index.vue has default layout, not checkout layout. It depends on route - de/checkout works fine, but just /checkout (which is default language) has broken layout\n\nMy i18n settings inside nuxt.cofig\n```\n\ti18n: {\n\t\tlocales: ['de', 'en'],\n\t\tdefaultLocale: 'en',\n\t\tstrategy: 'prefix_except_default',\n\t\tdetectBrowserLanguage: {\n\t\t\talwaysRedirect: false, \n\t\t},\n\t},\n```\n\nafter doing in my checkout page:\n```\nconst route = useRoute()\nconsole.log('route name:', route.name)\nconsole.log('route meta:', route.meta)\n\n```\nroute meta is undefined in my /checkout page but it has proper value inside /de/checkout\n\nDoes someone has experience with setting up i18n in projects with modules? ",[],3589,"Setting up i18n breaks layouts within modules","2025-05-07T10:41:10Z","https://github.com/nuxt-modules/i18n/issues/3589",0.69030654,["Reactive",3270],{},["Set"],["ShallowReactive",3273],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fmoiCDZld-f-0cOEaL3qMR0RTPATWPbeBalA6-ITv3KY":-1},"/nuxt-modules/i18n/3764"]