diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-03-03 14:25:36 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-03-03 14:25:36 +0900 |
| commit | 12f472b3fc8d0cef17e87785a84e49b96409637b (patch) | |
| tree | 0622e41a826fa43db889b129520eb8884b5acb52 /src/web/app/init.ts | |
| parent | :v: (diff) | |
| download | sharkey-12f472b3fc8d0cef17e87785a84e49b96409637b.tar.gz sharkey-12f472b3fc8d0cef17e87785a84e49b96409637b.tar.bz2 sharkey-12f472b3fc8d0cef17e87785a84e49b96409637b.zip | |
:v:
Diffstat (limited to 'src/web/app/init.ts')
| -rw-r--r-- | src/web/app/init.ts | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/src/web/app/init.ts b/src/web/app/init.ts index dc3057935f..716fe45e7a 100644 --- a/src/web/app/init.ts +++ b/src/web/app/init.ts @@ -6,10 +6,24 @@ import Vue from 'vue'; import VueRouter from 'vue-router'; import VModal from 'vue-js-modal'; import Element from 'element-ui'; +import ElementLocaleEn from 'element-ui/lib/locale/lang/en'; +import ElementLocaleJa from 'element-ui/lib/locale/lang/ja'; + +import App from './app.vue'; +import checkForUpdate from './common/scripts/check-for-update'; +import MiOS, { API } from './common/mios'; +import { version, host, lang } from './config'; + +let elementLocale; +switch (lang) { + case 'ja': elementLocale = ElementLocaleJa; break; + case 'en': elementLocale = ElementLocaleEn; break; + default: elementLocale = ElementLocaleEn; break; +} Vue.use(VueRouter); Vue.use(VModal); -Vue.use(Element); +Vue.use(Element, { locale: elementLocale }); // Register global directives require('./common/views/directives'); @@ -29,12 +43,6 @@ Vue.mixin({ } }); -import App from './app.vue'; - -import checkForUpdate from './common/scripts/check-for-update'; -import MiOS, { API } from './common/mios'; -import { version, host, lang } from './config'; - /** * APP ENTRY POINT! */ |