Package org.molgenis.i18n
Interface ContextMessageSource
-
- All Known Implementing Classes:
ContextMessageSourceImpl
public interface ContextMessageSourceReturns messages based on theLocaleContextHolder
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.StringgetMessage(java.lang.String code)Returns the message in the locale of the current user.java.lang.StringgetMessage(java.lang.String code, java.lang.Object[] args)Returns the message in the locale of the current user.
-
-
-
Method Detail
-
getMessage
java.lang.String getMessage(java.lang.String code)
Returns the message in the locale of the current user.- Parameters:
code- the code to lookup up, such as 'calculator.noRateSet'- Returns:
- the resolved message, never null
- Throws:
org.springframework.context.NoSuchMessageException- if the message wasn't found
-
getMessage
java.lang.String getMessage(java.lang.String code, @Nullable @CheckForNull java.lang.Object[] args)Returns the message in the locale of the current user.- Parameters:
code- the code to lookup up, such as 'calculator.noRateSet'args- an array of arguments that will be filled in for params within the message (params look like "{0}", "{1,date}", "{2,time}" within a message), * ornullif none.- Returns:
- the resolved message, never null
- Throws:
org.springframework.context.NoSuchMessageException- if the message wasn't found
-
-