Skip to content

How do I access current language outside setup? (Especially from a plugin!) #94

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

Open
SH1R3F opened this issue Oct 17, 2022 · 0 comments

Comments

@SH1R3F
Copy link

SH1R3F commented Oct 17, 2022

Right now, I'm trying to build a plugin to do something depending on current language, so I need to get access to what current language is.
so, the idea that comes up on my mind now is to get useI18n().locale;
but it doesn't work leading to this error "Must be called at the top of a setup function"
Any help would be very appreciated !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant