aboutsummaryrefslogtreecommitdiff
path: root/src/main.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/main.js
parentacbef1ebdc5697daf43c6b63b2ba7f8cd1143944 (diff)
Messages: Load languages asynchronously.
Reduces the size of the initial app bundle by about half.
Diffstat (limited to 'src/main.js')
-rw-r--r--src/main.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main.js b/src/main.js
index be4213fa..9a201e4f 100644
--- a/src/main.js
+++ b/src/main.js
@@ -46,11 +46,13 @@ Vue.use(VBodyScrollLock)
const i18n = new VueI18n({
// By default, use the browser locale, we will update it if neccessary
- locale: currentLocale,
+ locale: 'en',
fallbackLocale: 'en',
- messages
+ messages: messages.default
})
+messages.setLanguage(i18n, currentLocale)
+
const persistedStateOptions = {
paths: [
'config',