Answer the question
In order to leave comments, you need to log in
How to put alert using i18n Vue 3 Cli?
Hello, please tell me how can I use alert( t("hello") );
using en.json / ru.json
For example
import { useI18n } from "vue-i18n";
setup() {
const { t } = useI18n({
inheritLocale: true,
useScope: "local",
});
return { t };
},
mounted(){alert (t("hello"))}
Uncaught TypeError: vue_i18n__WEBPACK_IMPORTED_MODULE_2__.useI18n.t is not a function
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question