Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use with option api when legacy is false #1713

Closed
4 tasks done
magic3584 opened this issue Jan 24, 2024 · 0 comments
Closed
4 tasks done

How to use with option api when legacy is false #1713

magic3584 opened this issue Jan 24, 2024 · 0 comments
Labels
Status: Review Needed Request for review comments

Comments

@magic3584
Copy link

magic3584 commented Jan 24, 2024

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

@magic3584 magic3584 added the Status: Review Needed Request for review comments label Jan 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Review Needed Request for review comments
Projects
None yet
Development

No branches or pull requests

1 participant