Package io.nevernull.mobileui.i18n
Class MessagesImpl
- java.lang.Object
-
- io.nevernull.mobileui.i18n.MessagesImpl
-
-
Constructor Summary
Constructors Constructor Description MessagesImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
get(String key, Object... arguments)
Get a message by key from the 'messages' resource bundle.String
getOrDefault(String key, String defaultMessage, Object... arguments)
Get a message by key from the 'messages' resource bundle.
-
-
-
Method Detail
-
get
public String get(String key, Object... arguments)
Description copied from interface:Messages
Get a message by key from the 'messages' resource bundle. If you give arguments, they are interpolated into the message as documented in theMessageFormat
javadoc.
-
getOrDefault
public String getOrDefault(String key, String defaultMessage, Object... arguments)
Description copied from interface:Messages
Get a message by key from the 'messages' resource bundle. If the message is not found, it defaults to the defaultMessage given here. If you give arguments, they are interpolated into the message as documented in theMessageFormat
javadoc.- Specified by:
getOrDefault
in interfaceMessages
- Parameters:
key
- the keydefaultMessage
- the default message the method is falling back to, if the resource bundle does not contain the keyarguments
- the optional arguments to be interpolated- Returns:
- the message
-
-