diff --git a/src/App.vue b/src/App.vue index f56d810..60dc4cc 100644 --- a/src/App.vue +++ b/src/App.vue @@ -33,7 +33,12 @@ let settings: Settings = new Settings(store.width, store.height); let map: Map; +import { useI18n } from "vue-i18n"; +const t = useI18n(); + onMounted(() => { + t.locale.value = localStorage.getItem('locale') || 'en'; + store.stations = [ {'name': 'Начало', 'up': true, 'connectedStations': [], 'step': 0}, {'name': 'Конец', 'up': true, 'connectedStations': [], 'step': store.width - 400} @@ -46,6 +51,10 @@ onMounted(() => { build(); }) +function setStorage(val) { + localStorage.setItem('locale', val); +} + function exportFile() { build(); @@ -168,8 +177,8 @@ store.$subscribe((mutation, state) => {