Skip to content

Commit

Permalink
feat(demo): add Locale for demo
Browse files Browse the repository at this point in the history
根据demo语言设置quark Local
  • Loading branch information
gaoxiaoduan committed Nov 8, 2022
1 parent 44d10c6 commit e220d35
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions example/src/sites/mobile-vue/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ import connect, { close } from "../../utils/wsClient";
import { initDemoLang } from "@/sites/assets/util/useTranslate";
import "@quarkd/icons/lib/arrow-left";
import EnUSLang from "@/locale/lang/en-US";
import ZhCNLang from "@/locale/lang/zh-CN";
import Locale from "../../../../packages/quark/src/locale";
if (isMobile && import.meta.env.DEV) {
const vConsole = new VConsole();
}
Expand Down Expand Up @@ -53,8 +57,10 @@ export default defineComponent({
if (window.location.href.indexOf("en-US") > -1) {
initDemoLang("en-US");
Locale.use(new EnUSLang());
} else {
initDemoLang("zh-CN");
Locale.use(new ZhCNLang());
}
});
Expand Down

0 comments on commit e220d35

Please sign in to comment.