mirror of https://gitee.com/y_project/RuoYi.git
update locale
parent
82a0eaed4a
commit
85cf318a94
|
@ -1,7 +1,7 @@
|
|||
package com.ruoyi.common.utils;
|
||||
|
||||
import org.springframework.context.MessageSource;
|
||||
import com.ruoyi.common.constant.Constants;
|
||||
import org.springframework.context.i18n.LocaleContextHolder;
|
||||
import com.ruoyi.common.utils.spring.SpringUtils;
|
||||
|
||||
/**
|
||||
|
@ -21,6 +21,6 @@ public class MessageUtils
|
|||
public static String message(String code, Object... args)
|
||||
{
|
||||
MessageSource messageSource = SpringUtils.getBean(MessageSource.class);
|
||||
return messageSource.getMessage(code, args, Constants.DEFAULT_LOCALE);
|
||||
return messageSource.getMessage(code, args, LocaleContextHolder.getLocale());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue