public interface Messages
extends play.api.i18n.MessagesProvider
This interface that is typically backed by MessagesImpl, but does not return MessagesApi.
Modifier and Type | Interface and Description |
---|---|
static class |
Messages.Attrs |
Modifier and Type | Method and Description |
---|---|
default String |
apply(List<String> keys,
Object... args)
Get the message at the first defined key.
|
default String |
apply(String key,
Object... args)
Get the message at the given key.
|
play.api.i18n.Messages |
asScala() |
String |
at(List<String> keys,
Object... args)
Get the message at the first defined key.
|
String |
at(String key,
Object... args)
Get the message at the given key.
|
Boolean |
isDefinedAt(String key)
Check if a message key is defined.
|
Lang |
lang()
Get the lang for these messages.
|
default play.api.i18n.Messages |
messages() |
Lang lang()
default String apply(String key, Object... args)
Uses `java.text.MessageFormat` internally to format the message.
key
- the message keyargs
- the message argumentsdefault String apply(List<String> keys, Object... args)
Uses `java.text.MessageFormat` internally to format the message.
keys
- the messages keysargs
- the message argumentsString at(String key, Object... args)
Uses `java.text.MessageFormat` internally to format the message.
key
- the message keyargs
- the message argumentsString at(List<String> keys, Object... args)
Uses `java.text.MessageFormat` internally to format the message.
keys
- the messages keysargs
- the message argumentsBoolean isDefinedAt(String key)
key
- the message keyplay.api.i18n.Messages asScala()
default play.api.i18n.Messages messages()
messages
in interface play.api.i18n.MessagesProvider