【发布时间】:2021-08-05 12:46:20
【问题描述】:
我正在使用 Vue 2.6.14 和 vue-i18n 8.25 我不知道如何将 i18n 翻译放入 alert()...
async ChangePassword() {
await axios.post('/api/reset-password',
this.form).then((response) => {
alert( {{ $t('Password changed') }} );
})}
这似乎不起作用。
【问题讨论】:
-
请提供stackoverflow.com/help/mcve。不知道你在哪里做的。
-
alert( this.$t('Password changed') );怎么样 -
谢谢@BoussadjraBrahim!它有效!
标签: vue.js internationalization vue-i18n