main.ts 907 Bytes
Newer Older
RWTH App's avatar
RWTH App committed
1
import Vue from 'vue';
2
import LoginApp from './LoginApp.vue';
3
import jQuery from 'jquery';
4
import BootstrapVue from 'bootstrap-vue';
5
6
import '@itcenter-layout/bootstrap/dist/css/rwth-theme.css';
import '@itcenter-layout/bootstrap/dist/css/material-icons.css';
7
import '@itcenter-layout/masterpage/dist/css/itcenter-masterdesign-masterpage.css';
8
import VueI18n from 'vue-i18n';
RWTH App's avatar
RWTH App committed
9
10
11

Vue.config.productionTip = false;

12
Vue.use(BootstrapVue);
13
Vue.use(VueI18n);  
14

15
16
17
18
19
20
21
let localeValue = ((navigator as any).language || (navigator as any).userLanguage) as string;
if (localeValue.indexOf('de') !== -1) {
  localeValue = 'de';
} else {
  localeValue = 'en';
}

22
23
jQuery(() => {
  const i18n = new VueI18n({
24
    locale: localeValue, // set locale
25
    messages: coscine.i18n.login, // set locale messages
26
27
28
29
    silentFallbackWarn: true,
  });

  new Vue({
30
    render: (h) => h(LoginApp),
31
32
33
    i18n,
  }).$mount('#loginpage');
});