Skip to content

Cannot set formatFallbackMessages #3670

@ThibaudDauce

Description

@ThibaudDauce

Environment


  • Operating System: Linux
  • Node Version: v23.11.1
  • Nuxt Version: 3.17.4
  • CLI Version: 3.25.1
  • Nitro Version: 2.11.12
  • Package Manager: npm@11.4.0
  • Builder: -
  • User Config: compatibilityDate, devtools, modules, i18n, devServer
  • Runtime Modules: @nuxtjs/i18n@9.5.5
  • Build Modules: -

Reproduction

Minimal repo here https://github.com/ThibaudDauce/test_i18n

This is my app.vue:

<template>
  <div>
    <p>{{ $t('Hello {name}', { name: 'John' }) }}</p>
    <p>{{ $t('The weather today is {condition}!', { condition: 'sunny' }) }}</p>
  </div>
</template>

With this i18n/i18n.config.ts:

export default defineI18nConfig(() => {
  return {
    missingWarn: false,
    formatFallbackMessages: true,
  }
})

And this nuxt.config.ts:

export default defineNuxtConfig({
  compatibilityDate: '2025-05-15',
  devtools: { enabled: true },
  modules: ['@nuxtjs/i18n'],
  i18n: {
    defaultLocale: 'fr',
  },
  devServer: {
    port: 8080,
  },
})

missingWarn: false is working so the config seems to be loaded correctly.

Describe the bug

When I set formatFallbackMessages: true, the messages are not formatted in the template.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions