fix: "TypeError: i18n.setLocaleMessage is not a function" when changing languages
Some checks failed
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is failing

This commit is contained in:
kolaente 2021-10-17 13:55:25 +02:00
parent f884020c55
commit 74d785d606
Signed by: konrad
GPG Key ID: F40E70337AB24C9B

View File

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