How do I access current language outside setup? (Especially from a plugin!)
SH1R3F opened this issue · comments
Mahmoud Shiref commented
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 !