chore: 兼容前端默认国际化

This commit is contained in:
fit2-zhao 2024-08-12 16:34:52 +08:00 committed by Craftsman
parent c1e69eeb3e
commit 8f51fc5395
2 changed files with 3 additions and 3 deletions

View File

@ -49,7 +49,7 @@ public class LoginController {
if (user != null) { if (user != null) {
UserDTO userDTO = userLoginService.getUserDTO(user.getId()); UserDTO userDTO = userLoginService.getUserDTO(user.getId());
if (StringUtils.isBlank(userDTO.getLanguage())) { if (StringUtils.isBlank(userDTO.getLanguage())) {
userDTO.setLanguage(defaultLocale); userDTO.setLanguage(defaultLocale.replace("_", "-"));
} }
userLoginService.autoSwitch(userDTO); userLoginService.autoSwitch(userDTO);

View File

@ -63,7 +63,7 @@ public class UserLocalConfigController {
@GetMapping(value = "/default-locale") @GetMapping(value = "/default-locale")
public String defaultLocale() { public String defaultLocale() {
return defaultLocale; return defaultLocale.replace("_", "-");
} }
} }