diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/service/NoticeSendService.java b/backend/services/system-setting/src/main/java/io/metersphere/system/service/NoticeSendService.java index ae1c14e703..d1cb56237a 100644 --- a/backend/services/system-setting/src/main/java/io/metersphere/system/service/NoticeSendService.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/service/NoticeSendService.java @@ -85,8 +85,10 @@ public class NoticeSendService { private static void setLanguage(NoticeModel noticeModel) { String language = (String) noticeModel.getParamMap().get("Language"); Locale locale = Locale.SIMPLIFIED_CHINESE; - if (StringUtils.isNotBlank(language)) { - locale = Locale.forLanguageTag(language); + if (StringUtils.containsIgnoreCase("US",language)) { + locale = Locale.US; + } else if (StringUtils.containsIgnoreCase("TW",language)){ + locale = Locale.TAIWAN; } LocaleContextHolder.setLocale(locale); }