Messages: Load languages asynchronously.

Reduces the size of the initial app bundle by about half.
This commit is contained in:
lain 2020-06-08 17:22:07 +02:00
parent acbef1ebdc
commit 99eaec8547
5 changed files with 80 additions and 32 deletions

View file

@ -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',