我刚刚使用Vue3启动了一个新项目,并添加了我设置的vue-i18n版本9 (https://vue-i18n.intlify.dev/guide/),但我不能更改语言。它正在进行翻译,因为它将{{ $t('message.value') }}更改为正确的句子。我无法更改语言,仅适用于区域设置语言。
我在浏览器控制台中收到此错误消息
You are running the esm-bundler build of vue-i18n. It is recommended to configure your bundler to explicitly replace feature flag globals with boolean literals to get proper tree-shaking in the final bundle.这是我的配置,但我不能将其更改为西班牙语
const i18n = VueI18n.createI18n({
locale: 'en', // set locale
fallbackLocale: 'en', // set fallback locale
messages, // set locale messages
})如果你能帮助我,告诉我我做错了什么,我将不胜感激。非常感谢
发布于 2021-03-11 19:02:47
当你在生产模式下运行你的应用程序时,你不应该看到它。
在开发中运行时,它已在v2.0.1版本中进行了更正
https://stackoverflow.com/questions/66421384
复制相似问题