英文:
Vue Nuxt I18n , the message properties it's not reflect directly when add new one or edit exist property
问题
我有一个Nuxt项目,当我尝试添加或编辑消息属性时,它不会立即反映出来,我应该终止应用程序并重新运行它才能看到结果。我遵循了Nuxt文档并应用了每一步。
英文:
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
答案1
得分: 1
编辑你的 nuxt.config.js
模块,使其如下所示:
modules: [
[
"@nuxtjs/i18n",
{
locales: [{ code: "en", name: "en-US", file: "en.json" }],
langDir: "locales/"
}
],
]
假设你的字符串文件名为 en.json
,并且它位于 locales/
目录中,如 locales/en.json
。
英文:
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
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论