From 3120c1dd0047e5cef428a27385b8e7a0535b4c8c Mon Sep 17 00:00:00 2001
From: ‘liusuyi’ <1951119284@qq.com>
Date: 星期一, 20 十一月 2023 11:31:20 +0800
Subject: [PATCH] 后端双语-强制中文
---
ruoyi-common/src/main/java/com/ruoyi/common/filter/MyI18nInterceptor.java | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/filter/MyI18nInterceptor.java b/ruoyi-common/src/main/java/com/ruoyi/common/filter/MyI18nInterceptor.java
index 9046e96..07523a1 100644
--- a/ruoyi-common/src/main/java/com/ruoyi/common/filter/MyI18nInterceptor.java
+++ b/ruoyi-common/src/main/java/com/ruoyi/common/filter/MyI18nInterceptor.java
@@ -15,7 +15,9 @@
@Override
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
final String key = "language";
- String language = "en_US";//request.getHeader(key);
+ //String language = "en_US";
+ String language = "zh_CN";
+ //String language = request.getHeader(key);
// 鍓嶇浼犻�掔殑language蹇呴』鏄痾h-CN鏍煎紡鐨勶紝涓棿鐨�-蹇呴』瑕佸畬鏁达紝涓嶈兘鍙紶閫抸h鎴杄n
log.debug("褰撳墠璇█={}",language);
Locale locale = new Locale(language.split("_")[0],language.split("_")[1]);
--
Gitblit v1.9.3