【发布时间】:2019-05-27 14:10:33
【问题描述】:
如果VueI18n 没有找到它,它是否可以退回到较短的键。
这方面的一个例子可能是,我有以下消息:
{
en: {
"hello": "This is the fallback message!",
"admin.hello": "This is some other message for another context"
}
}
下面的代码说明了结果应该是什么:
{{ $t("does.not.exists.hello") }} // should fallback on hello, so the result will be "This is the fallback message!"
{{ $t("admin.hello") }} // Message exists so the result should be "This is some other message for another context"
{{ $t("hello") }} // Message exists so the result should be "This is the fallback message!"
【问题讨论】:
标签: vue.js internationalization