Commit dedfa168 authored by Quxl's avatar Quxl

ff

parent 96e9e0f4
......@@ -17,7 +17,7 @@ public class LocaleCookieInterceptor extends HandlerInterceptorAdapter {
@Override
public boolean preHandle(HttpServletRequest req, HttpServletResponse resp, Object handler) throws Exception {
String str = req.getParameter(language);
if(str == null || str.trim().length() == 0) {
if(str == null || str.matches("[a-z]{2}_[A-Z]{2}")) {
str = "zh_CN";
}
String[] kv = str.trim().split("_", 2);
......
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