aboutsummaryrefslogtreecommitdiff
path: root/src/App.js
diff options
context:
space:
mode:
authorlain <lain@soykaf.club>2020-06-08 17:22:07 +0200
committerlain <lain@soykaf.club>2020-06-08 17:22:07 +0200
commit99eaec85478f384ddb0ea45a9d9c95c4dce646f5 (patch)
tree0db1a11c1d68ed9b8217fe93e79534719b1f93a1 /src/App.js
parentacbef1ebdc5697daf43c6b63b2ba7f8cd1143944 (diff)
Messages: Load languages asynchronously.
Reduces the size of the initial app bundle by about half.
Diffstat (limited to 'src/App.js')
-rw-r--r--src/App.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/App.js b/src/App.js
index 6445335a..040138c9 100644
--- a/src/App.js
+++ b/src/App.js
@@ -47,7 +47,8 @@ export default {
}),
created () {
// Load the locale from the storage
- this.$i18n.locale = this.$store.getters.mergedConfig.interfaceLanguage
+ const val = this.$store.getters.mergedConfig.interfaceLanguage
+ this.$store.dispatch('setOption', { name: 'interfaceLanguage', value: val })
window.addEventListener('resize', this.updateMobileState)
},
destroyed () {