public class LocaleContextMessageInterpolator extends Object implements MessageInterpolator
MessageInterpolator
implementation but enforces Spring's
managed Locale. Typically used to wrap the validation provider's default interpolator.LocaleContextHolder.getLocale()
MessageInterpolator.Context
Constructor and Description |
---|
LocaleContextMessageInterpolator(MessageInterpolator targetInterpolator)
Create a new LocaleContextMessageInterpolator, wrapping the given target interpolator.
|
Modifier and Type | Method and Description |
---|---|
String |
interpolate(String message,
MessageInterpolator.Context context) |
String |
interpolate(String message,
MessageInterpolator.Context context,
Locale locale) |
public LocaleContextMessageInterpolator(MessageInterpolator targetInterpolator)
targetInterpolator
- the target MessageInterpolator to wrappublic String interpolate(String message, MessageInterpolator.Context context)
interpolate
in interface MessageInterpolator
public String interpolate(String message, MessageInterpolator.Context context, Locale locale)
interpolate
in interface MessageInterpolator