Search code examples
vuejs2nuxt.jsnuxt-i18n

Vue Nuxt I18n , the message properties it's not reflect directly when add new one or edit exist property


i have Nuxt project, when i try to add or edit message property it's not reflect direct, i should terminate the app and re-run it to see the results.

i followed the Nuxt Documentation and applied every single step


Solution

  • Edit your nuxt.config.js modules to look like this

    modules: [
      [
        "@nuxtjs/i18n",
        {
          locales: [{ code: "en", name: "en-US", file: "en.json" }],
          langDir: "locales/"
        }
      ],
    ]
    

    assuming your strings file is called en.json and it's inside locales/ like locales/en.json