Browse Source

网关国际化改造03

master
caojianbin 2 years ago
parent
commit
fcdc6185ce
  1. 2
      ruoyi-gateway/src/main/java/com/ruoyi/gateway/constant/MessagesConstant.java

2
ruoyi-gateway/src/main/java/com/ruoyi/gateway/constant/MessagesConstant.java

@ -52,7 +52,7 @@ public class MessagesConstant {
String msg=en_msg; String msg=en_msg;
ServerHttpRequest request = exchange.getRequest(); ServerHttpRequest request = exchange.getRequest();
if (request.getHeaders().containsKey(MessagesConstant.HEADER_KEY)) { if (request.getHeaders().containsKey(MessagesConstant.HEADER_KEY)) {
String zh = exchange.getRequest().getHeaders().getFirst(MessagesConstant.Language_ZH); String zh = exchange.getRequest().getHeaders().getFirst(MessagesConstant.HEADER_KEY);
if (MessagesConstant.Language_ZH.equals(zh)) { if (MessagesConstant.Language_ZH.equals(zh)) {
msg = zh_msg; msg = zh_msg;
} else { } else {

Loading…
Cancel
Save