How to use with option api when legacy is false
magic3584 opened this issue · comments
Lugick commented
Reporting a bug?
const i18n = createI18n({
locale: "en", // set locale
fallbackLocale: "en", // set fallback locale
messages, // set locale messages
legacy: false,
});
It works fine in template, but I cannot how to use in option api like in methods.
I have tried this.$i18n.t
this.$i18n.$t
$t
,does not work
Expected behavior
use like in template $t('message.key')
Reproduction
no
System Info
vue-i18n: 9 => 9.8.0
Screenshot
No response
Additional context
No response
Validations
- Read the Contributing Guidelines
- Read the Documentation
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Check that this is a concrete bug. For Q&A open a GitHub Discussions