| | |
| | | package com.xiaopeng.map.config; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.alibaba.fastjson2.JSON; |
| | | import com.alibaba.fastjson2.JSONObject; |
| | | import org.springframework.util.StringUtils; |
| | | import org.springframework.web.servlet.LocaleResolver; |
| | | |
| | |
| | | Locale locale = null; |
| | | if (StringUtils.isEmpty(language)) { |
| | | locale = Locale.getDefault(); |
| | | language = "1"; |
| | | } |
| | | //如果请求不为空 |
| | | //If the request is not empty. |
| | | if (!StringUtils.hasLength(language)){ |
| | | language = "1"; |
| | | } |
| | | if (language.equals("1")) { |
| | | locale = new Locale("zh", "CN"); |
| | | } else if (language.equals("2")) { |