How to address: Not found parent scope. use the global scope. #798
-
I'm trying to use vue-i18n@9's Component Interpolation, following the docs https://vue-i18n.intlify.dev/guide/advanced/component.html: // main.js
const i18n = createI18n({
legacy: false,
locale: "en",
messages: {
en: {
tos: "Term of Service",
term: "I accept xxx {0}.",
},
},
});
createApp(App).use(i18n).mount("#app"); // usage
<i18n-t keypath="term" tag="label" for="tos">
<a href="/" target="_blank">{{ t("tos") }}</a>
</i18n-t> and everything works fine, but I get a warning:
I've searched issues on the repo and haven't really found any useful information about this warning |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
In your case, you are running The The Translation Component ( |
Beta Was this translation helpful? Give feedback.
-
You can resolve warning message the by specifying |
Beta Was this translation helpful? Give feedback.
You can resolve warning message the by specifying
global
toscope
property oni18n-t
componentI've added docs about it
https://vue-i18n.intlify.dev/guide/advanced/component.html#scope-resolving