Setting language with a select list (using kazupon/vue-i18n plugin):
<select v-model="$i18n.locale" class="nav__lang-switcher">
<option v-for="(lang, i) in langs" :key="`lang${i}`" :value="lang.value">{{ lang.label }}</option>
</select>
But language changes are not persisting because it's not being stored anywhere.
Here's the action, that would change the language state:
actions: {
changeLanguage (context) {
context.commit('changeLanguage')
}
}
But how do i access $i18n.language
from vuex store?