diff --git a/src/App.vue b/src/App.vue index 189e32e4f..19a9113f4 100644 --- a/src/App.vue +++ b/src/App.vue @@ -59,6 +59,13 @@ export default class App extends mixins(UtilityMixin) { // Load settings using the default game before the actual game is selected. const settings: ManagerSettings = await this.$store.dispatch('resetActiveGame'); + // set display language from settings + if (typeof settings.getContext().global.displayLanguage === 'undefined') { + settings.setDisplayLanguage(this.$i18n.locale); + } else { + this.$i18n.locale = settings.getContext().global.displayLanguage; + } + this.hookThunderstoreModListRefresh(); await this.checkCdnConnection(); diff --git a/src/boot/i18n.ts b/src/boot/i18n.ts index 09268d580..1f25a9392 100644 --- a/src/boot/i18n.ts +++ b/src/boot/i18n.ts @@ -1,18 +1,20 @@ import Vue from 'vue'; import VueI18n from 'vue-i18n'; import messages from '../i18n'; +import Quasar from 'quasar'; Vue.use(VueI18n); const i18n = new VueI18n({ - locale: 'en-us', - fallbackLocale: 'en-us', - messages, + // Detecting Locale + locale: Quasar.lang.getLocale(), + fallbackLocale: 'en-us', + messages }); export default ({ app }: any) => { - // Set i18n instance on app - app.i18n = i18n; + // Set i18n instance on app + app.i18n = i18n; }; export { i18n }; diff --git a/src/components/ExpandableCard.vue b/src/components/ExpandableCard.vue index 0dff0b28f..aac0cdf9c 100644 --- a/src/components/ExpandableCard.vue +++ b/src/components/ExpandableCard.vue @@ -14,12 +14,12 @@ - + - - + + diff --git a/src/components/SettingsLoader.vue b/src/components/SettingsLoader.vue index a0192eb0b..e2fd60382 100644 --- a/src/components/SettingsLoader.vue +++ b/src/components/SettingsLoader.vue @@ -5,45 +5,35 @@