MessageInterpolator implementation but enforces Spring's
managed Locale. Typically used to wrap the validation provider's default interpolator.
org.springframework.context.i18n.LocaleContextHolder#getLocale()
| Modifier and Type | Field and Description |
|---|---|
| private final MessageInterpolator |
| Access | Constructor and Description |
|---|---|
| public | LocaleContextMessageInterpolator(MessageInterpolator
the target MessageInterpolator to wrap targetInterpolator)Create a new LocaleContextMessageInterpolator, wrapping the given target interpolator. |
| Modifier and Type | Method and Description |
|---|---|
| public String | interpolate(String
the message to interpolate message, MessageInterpolator.contextual information related to the interpolation contextImplements jakarta. |
| public String | interpolate(String
the message to interpolate message, MessageInterpolator.contextual information related to the interpolation context,the locale targeted for the message locale)Implements jakarta. |
| targetInterpolator | back to summary |
|---|---|
| private final MessageInterpolator targetInterpolator | |
| LocaleContextMessageInterpolator | back to summary |
|---|---|
| public LocaleContextMessageInterpolator(MessageInterpolator targetInterpolator) Create a new LocaleContextMessageInterpolator, wrapping the given target interpolator.
| |
| interpolate | back to summary |
|---|---|
| public String interpolate(String message, MessageInterpolator. Implements jakarta. Doc from jakarta. Interpolates the message template based on the constraint validation context.
The locale is defaulted according to the
| |
| interpolate | back to summary |
|---|---|
| public String interpolate(String message, MessageInterpolator. Implements jakarta. Doc from jakarta. Interpolates the message template based on the constraint validation context.
The | |