\n\n### Additional context\n\n_No response_\n\n### Logs\n\n```shell\n\n```",[3258,3259],{"name":3173,"color":3174},{"name":3176,"color":3177},3807,"静态生成时,.output下 locales语言文件是空的","2025-09-05T01:23:11Z","https://github.com/nuxt-modules/i18n/issues/3807",0.65907097,{"description":3266,"labels":3267,"number":3268,"owner":3179,"repository":3180,"state":3218,"title":3269,"updated_at":3270,"url":3271,"score":3272},"## Bug Report\n\n### Describe the bug\nThe base locale file (ar.json) is completely ignored by @nuxtjs/i18n in Nuxt 4, while market-specific locale files (ar-MA.json, ar-SA.json, ar-AE.json) load correctly. This results in a broken fallback mechanism where translations that should fall back to the base locale display as literal translation keys.\n\n### Environment\n- **Nuxt**: 4.1.2\n- **@nuxtjs/i18n**: 10.1.0\n- **Node**: Latest LTS\n- **Package Manager**: pnpm\n- **OS**: macOS\n- **Browser**: All browsers (SSR issue)\n\n### Configuration\n\n**nuxt.config.ts (i18n section)**:\n```typescript\ni18n: {\n vueI18n: './i18n.config.ts',\n lazy: true,\n langDir: 'locales',\n defaultLocale: 'ar-ma',\n strategy: 'prefix',\n locales: [\n {\n code: 'ar',\n iso: 'ar',\n language: 'ar',\n file: 'ar.json',\n name: 'العربية',\n dir: 'rtl'\n },\n {\n code: 'ar-ma',\n iso: 'ar-MA',\n language: 'ar-MA',\n file: 'ar-MA.json',\n name: 'العربية',\n dir: 'rtl'\n },\n // ... other market locales (ar-sa, ar-ae)\n ]\n}\n```\n\n**i18n.config.ts**:\n```typescript\nexport default defineI18nConfig(() => ({\n legacy: false,\n fallbackLocale: 'ar',\n missingWarn: false,\n fallbackWarn: false\n}))\n```\n\n**File structure**:\n```\nlocales/\n├── ar.json (7KB - comprehensive base translations)\n├── ar-MA.json (12KB - Morocco-specific translations)\n├── ar-SA.json (1KB - Saudi Arabia-specific translations)\n└── ar-AE.json (1KB - UAE-specific translations)\n```\n\n### Expected Behavior\n1. When accessing `/ar-ma/` route, ar-MA.json should load first\n2. For missing keys in ar-MA.json, the system should fall back to ar.json\n3. All translation keys should resolve to actual translated text\n\n### Actual Behavior\n1. ✅ ar-MA.json loads correctly and provides market-specific translations\n2. ❌ ar.json is completely ignored and never loads\n3. ❌ Missing keys display as literal translation keys (e.g., \"nav.mainMenu\" instead of translated text)\n\n### Reproduction Steps\n1. Set up Nuxt 4 project with @nuxtjs/i18n v10.1.0\n2. Configure multiple locales with a base locale and market-specific locales\n3. Use `lazy: true` and `prefix` strategy\n4. Set `defaultLocale` to a market-specific locale (e.g., 'ar-ma')\n5. Set `fallbackLocale` to base locale (e.g., 'ar')\n6. Create comprehensive base locale file and minimal market-specific files\n7. Access market-specific route (e.g., `/ar-ma/`)\n8. Observe that base locale translations never load\n\n### Console Output\nThe server consistently shows warnings for ALL keys that should be in the base locale:\n```\nWARN [intlify] Not found 'nav.mainMenu' key in 'ar' locale messages.\nWARN [intlify] Not found 'search.title' key in 'ar' locale messages.\nWARN [intlify] Not found 'landing.hero.startConsultation' key in 'ar' locale messages.\n[... hundreds of similar warnings]\n```\n\n### Debugging Attempts\n1. ✅ Verified ar.json is valid JSON with correct structure\n2. ✅ Verified ar.json contains all the keys being requested\n3. ✅ Cleared .nuxt, .output, and node_modules/.cache multiple times\n4. ✅ Restarted dev server completely\n5. ✅ Added debug text to ar.json - changes are never reflected in output\n6. ✅ Confirmed file permissions and encoding are correct\n7. ❌ Base locale file is never loaded by the i18n system\n\n### Key Findings\n- **Market-specific locales work perfectly**: ar-MA.json loads and displays Morocco-specific translations\n- **Fallback logic works**: The system attempts to fall back to 'ar' locale (as shown in console warnings)\n- **Base locale completely ignored**: Despite being properly configured and containing valid translations, ar.json is never loaded\n- **File is valid**: ar.json parses correctly with node -e \"JSON.parse(...)\"\n\n### Minimal Reproduction\nThis appears to be related to the combination of:\n- Nuxt 4.1.2\n- @nuxtjs/i18n 10.1.0 \n- `lazy: true` configuration\n- `prefix` strategy\n- `defaultLocale` set to non-base locale\n- Multiple market-specific locales with base locale fallback\n\n### Impact\nThis breaks the core fallback functionality of internationalization, causing numerous UI elements to display as literal translation keys instead of translated text, significantly degrading user experience.\n\n### Workaround\nCurrently, the only workaround is to duplicate all base translations into each market-specific locale file, which defeats the purpose of having a fallback mechanism and creates maintenance overhead.",[],3824,"Base locale file not loading in Nuxt 4 with @nuxtjs/i18n v10.1.0 - Fallback mechanism partially broken","2025-10-08T13:11:01Z","https://github.com/nuxt-modules/i18n/issues/3824",0.66198874,["Reactive",3274],{},["Set"],["ShallowReactive",3277],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$f9FMpkX1lZaKnEQPS3A7BqipbAEBcX_eJbqhZ3651T0g":-1},"/nuxt-modules/i18n/3760"]