From 22094ed429271ec254ce6a1e9ada7d4b23b3291a Mon Sep 17 00:00:00 2001 From: CaptainB Date: Thu, 16 Dec 2021 18:05:40 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=9B=BD=E9=99=85?= =?UTF-8?q?=E5=8C=96=E5=90=8E=E5=8F=B0=E5=A4=B1=E6=95=88=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/i18n/i18n.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/i18n/i18n.js b/frontend/src/i18n/i18n.js index db8aa23e32..16d9ee5db2 100644 --- a/frontend/src/i18n/i18n.js +++ b/frontend/src/i18n/i18n.js @@ -35,7 +35,7 @@ const loadedLanguages = ['en_US', 'zh_CN', 'zh_TW']; function setI18nLanguage(lang) { i18n.locale = lang; - axios.defaults.headers.common['Accept-Language'] = lang; + axios.defaults.headers.common['Accept-Language'] = lang.replace("_", "-"); document.querySelector('html').setAttribute('lang', lang); return lang; }