nuxt3 icon indicating copy to clipboard operation
nuxt3 copied to clipboard

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

Open SH1R3F opened this issue 3 years ago • 0 comments

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 !

SH1R3F avatar Oct 17 '22 15:10 SH1R3F