adbrosaci / vue-lang-router

Vue language routing with (optional) localized URLs.
MIT License
65 stars 8 forks source link

Get current active language #17

Closed lvl99wzrd closed 3 years ago

lvl99wzrd commented 3 years ago

Hi,

I wonder if there's a function that returns the current active locale index and name? I'm trying to use this.$i18n.locale but it is undefined.

I need to know the current locale for conditional component rendering.

Thank you.

lvl99wzrd commented 3 years ago

Ah no worries. I was stupid to use this.i18n.locale inside the template tag, it should be $i18n.locale.