public interface Messages
Modifier and Type | Method and Description |
---|---|
String |
get(String key)
Get the message from the bundle.
|
String |
get(String key,
Object[] args)
Replace the {n} parameters in the string.
|
String |
getBasename()
If no basename is provided this method returns DEFAULT_BASENAME.
|
Locale |
getLocale() |
String |
getWithDefault(String key,
Object[] args,
String defaultMsg)
With default value and replacement strings.
|
String |
getWithDefault(String key,
String defaultMsg)
You can provide a default value if the key is not found.
|
Iterator<String> |
keys()
Iterate over the keys.
|
void |
reload()
Reload the messages.
|
Locale getLocale()
String getBasename()
String get(String key)
key
- the keyString get(String key, Object[] args)
MessageFormat.format(String, Object...)
String getWithDefault(String key, String defaultMsg)
key
- keydefaultMsg
- the default messageString getWithDefault(String key, Object[] args, String defaultMsg)
key
- keyargs
- replacement stringsdefaultMsg
- default messageCopyright © 2003–2018 Magnolia International Ltd.. All rights reserved.