fix: "TypeError: i18n.setLocaleMessage is not a function" when changing languages

This commit is contained in:
kolaente 2021-10-17 13:55:25 +02:00
parent f884020c55
commit 74d785d606
No known key found for this signature in database
GPG key ID: F40E70337AB24C9B

View file

@ -40,7 +40,7 @@ export const loadLanguageAsync = lang => {
// If the language hasn't been loaded yet
return import(`./lang/${lang}.json`).then(
messages => {
i18n.setLocaleMessage(lang, messages.default)
i18n.global.setLocaleMessage(lang, messages.default)
loadedLanguages.push(lang)
return setI18nLanguage(lang)
},