Messages: Load languages asynchronously.
Reduces the size of the initial app bundle by about half.
This commit is contained in:
parent
acbef1ebdc
commit
99eaec8547
5 changed files with 80 additions and 32 deletions
|
@ -1,5 +1,6 @@
|
|||
import { set, delete as del } from 'vue'
|
||||
import { setPreset, applyTheme } from '../services/style_setter/style_setter.js'
|
||||
import messages from '../i18n/messages'
|
||||
|
||||
const browserLocale = (window.navigator.language || 'en').split('-')[0]
|
||||
|
||||
|
@ -115,6 +116,10 @@ const config = {
|
|||
case 'customTheme':
|
||||
case 'customThemeSource':
|
||||
applyTheme(value)
|
||||
break
|
||||
case 'interfaceLanguage':
|
||||
messages.setLanguage(this.getters.i18n, value)
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue