Skip to content

Commit

Permalink
Fix change language issue in the setup page
Browse files Browse the repository at this point in the history
  • Loading branch information
louislam committed Feb 6, 2023
1 parent 271cca0 commit 0197778
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/pages/Setup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
</p>

<div class="form-floating">
<select id="language" v-model="$i18n.locale" class="form-select">
<select id="language" v-model="$root.language" class="form-select">
<option v-for="(lang, i) in $i18n.availableLocales" :key="`Lang${i}`" :value="lang">
{{ $i18n.messages[lang].languageName }}
</option>
Expand Down Expand Up @@ -59,9 +59,7 @@ export default {
};
},
watch: {
"$i18n.locale"() {
localStorage.locale = this.$i18n.locale;
},
},
mounted() {
this.$root.getSocket().emit("needSetup", (needSetup) => {
Expand Down

0 comments on commit 0197778

Please sign in to comment.