Replies: 1 comment
-
And there is another problem, I have zh-CN and en but I never added zh, but zh appears in the warning |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
vue-i18n@9
const i18n = createI18n({
legacy: false,
globalInjection: true,
messages:[
{“zh-cn”:{message:"msg"},
{“en”:{message:"msg"},
]
});
// views/pageA.vue
<script setup> const {t} = useI18n(); t("message"); // Unable to get characters </script>I checked the return value of usei18n in the page. It is the same as the ID when creating, and the messages are also correct, and isGlobal is true. Strangely, it cannot be read
Beta Was this translation helpful? Give feedback.
All reactions