From 74d785d60659f1525f62fad0a122e13886b3501d Mon Sep 17 00:00:00 2001 From: kolaente Date: Sun, 17 Oct 2021 13:55:25 +0200 Subject: [PATCH] fix: "TypeError: i18n.setLocaleMessage is not a function" when changing languages --- src/i18n/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/i18n/index.js b/src/i18n/index.js index 6b21f2a9..c922846c 100644 --- a/src/i18n/index.js +++ b/src/i18n/index.js @@ -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) },