Newer
Older
<template>
<v-list subheader max-width="250">
<v-subheader>{{$t("settings.locale")}}</v-subheader>
<v-select rounded
v-model="updateLocale"
prepend-inner-icon="language"
outlined
:items="locales"
dense>
</v-select>
</v-list>
</template>
<script>
export default {
data() {
return {
locales: [{text: "norsk (bokmål)", value: "nob"}, {text: "norsk (nynorsk)", value: "nno"}, {text:"english", value: "eng"}],
localesMap: {"nob": "norsk (bokmål)", "nno": "norsk (nynorsk)", "eng": "english"},
}
},
computed: {
updateLocale: {
get () { return {text: this.localesMap[this.$store.state.currentLocale], value: this.$store.state.currentLocale}},
set(value) {
this.$store.commit("setLocale", {value: value, i18n: this._i18n})
}
}
},
}
</script>