2023-07-30 15:55:13 +02:00
|
|
|
import './assets/main.sass';
|
2023-07-26 19:33:29 +02:00
|
|
|
|
2023-07-30 15:55:13 +02:00
|
|
|
import { createApp } from 'vue';
|
2023-08-07 15:23:07 +02:00
|
|
|
import { createI18n } from 'vue-i18n'
|
2023-08-07 17:32:54 +02:00
|
|
|
import { useStorage } from '@vueuse/core'
|
2023-07-30 15:55:13 +02:00
|
|
|
import App from './App.vue';
|
|
|
|
import router from './router';
|
2023-07-26 19:33:29 +02:00
|
|
|
|
2023-08-07 15:23:07 +02:00
|
|
|
import msg_en from './locales/en.json';
|
|
|
|
|
2023-08-07 17:32:54 +02:00
|
|
|
const default_locale = 'en'
|
|
|
|
const stored_locale = useStorage('sake-locale', '');
|
|
|
|
if (!stored_locale.value) {
|
|
|
|
stored_locale.value = default_locale
|
|
|
|
}
|
|
|
|
|
2023-08-07 15:23:07 +02:00
|
|
|
const messages = {
|
|
|
|
en: msg_en,
|
|
|
|
};
|
|
|
|
const i18n = createI18n({
|
2023-08-07 17:32:54 +02:00
|
|
|
locale: stored_locale.value,
|
|
|
|
fallbackLocale: default_locale,
|
2023-08-07 15:23:07 +02:00
|
|
|
messages,
|
|
|
|
});
|
|
|
|
|
2023-07-30 15:55:13 +02:00
|
|
|
const app = createApp(App);
|
|
|
|
app.use(router);
|
2023-08-07 15:23:07 +02:00
|
|
|
app.use(i18n);
|
2023-07-30 15:55:13 +02:00
|
|
|
app.mount('#app');
|