diff --git a/src/App.vue b/src/App.vue index aabbff2..b01dcaa 100644 --- a/src/App.vue +++ b/src/App.vue @@ -10,6 +10,7 @@
+
@@ -92,18 +93,13 @@ export default defineComponent({ StorageManager.setStringValue(STORAGE_VERSION_KEY, this.appVersion); }, - changeLang(lang: string) { - this.$i18n.locale = lang; - this.store.currentAppLocale = lang; - - StorageManager.setStringValue('lang', lang); - }, + loadLang() { const storageLang = StorageManager.getStringValue('lang'); if (storageLang) { - this.changeLang(storageLang); + this.store.changeLang(storageLang); return; } @@ -112,7 +108,7 @@ export default defineComponent({ const naviLanguage = window.navigator.language.toString(); if (!naviLanguage.startsWith('pl')) { - this.changeLang('en'); + this.store.changeLang('en'); } } } diff --git a/src/components/App/AppNavbar.vue b/src/components/App/AppNavbar.vue index eea1d84..b6d8219 100644 --- a/src/components/App/AppNavbar.vue +++ b/src/components/App/AppNavbar.vue @@ -3,26 +3,39 @@