Commit 47b4b7d1 authored by Quxl's avatar Quxl

xx

parent dedfa168
...@@ -21,9 +21,7 @@ public class LocaleCookieInterceptor extends HandlerInterceptorAdapter { ...@@ -21,9 +21,7 @@ public class LocaleCookieInterceptor extends HandlerInterceptorAdapter {
str = "zh_CN"; str = "zh_CN";
} }
String[] kv = str.trim().split("_", 2); String[] kv = str.trim().split("_", 2);
String language = kv[0]; LocaleContextHolder.setLocale(new Locale(kv[0], kv[1]));
String country = kv.length > 1 ? kv[1] : "";
LocaleContextHolder.setLocale(new Locale(language, country));
return super.preHandle(req, resp, handler); return super.preHandle(req, resp, handler);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment