mirror of
https://github.com/GiriNeko/YesPlayMusic.git
synced 2025-12-16 21:28:06 +00:00
feat: save lang to localStorage
This commit is contained in:
parent
91fac552e0
commit
281f9fe0bc
5 changed files with 67 additions and 50 deletions
|
|
@ -1,5 +1,6 @@
|
|||
import Vue from "vue";
|
||||
import VueI18n from "vue-i18n";
|
||||
import store from "@/store";
|
||||
|
||||
import en from "./lang/en.js";
|
||||
import zhCN from "./lang/zh-CN.js";
|
||||
|
|
@ -7,7 +8,7 @@ import zhCN from "./lang/zh-CN.js";
|
|||
Vue.use(VueI18n);
|
||||
|
||||
const i18n = new VueI18n({
|
||||
locale: "en",
|
||||
locale: store.state.settings.lang,
|
||||
messages: {
|
||||
en,
|
||||
"zh-CN": zhCN
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue