case class MessagesImpl(lang: Lang, messagesApi: MessagesApi) extends Messages with Product with Serializable
- Alphabetic
- By Inheritance
- MessagesImpl
- Serializable
- Product
- Equals
- Messages
- MessagesProvider
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new MessagesImpl(lang: Lang, messagesApi: MessagesApi)
- lang
The lang (context)
- messagesApi
The messages API
Value Members
- def apply(keys: Seq[String], args: Any*): String
Translates the first defined message.
Translates the first defined message.
Uses
java.text.MessageFormat
internally to format the message.- keys
the message key
- args
the message arguments
- returns
the formatted message or a default rendering if the key wasn’t defined
- Definition Classes
- → Messages
- def apply(key: String, args: Any*): String
Translates a message.
Translates a message.
Uses
java.text.MessageFormat
internally to format the message.- key
the message key
- args
the message arguments
- returns
the formatted message or a default rendering if the key wasn’t defined
- Definition Classes
- → Messages
- def asJava: i18n.Messages
- returns
the Java version for this Messages.
- Definition Classes
- → Messages
- def isDefinedAt(key: String): Boolean
Check if a message key is defined.
- val lang: Lang
Returns the language associated with the messages.
Returns the language associated with the messages.
- returns
the selected language.
- Definition Classes
- → Messages
- def messages: Messages
Every Messages is also a MessagesProvider.
Every Messages is also a MessagesProvider.
- returns
the messages itself.
- Definition Classes
- → MessagesProvider
- val messagesApi: MessagesApi
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- def translate(key: String, args: Seq[Any]): Option[String]
Translates a message.
Translates a message.
Uses
java.text.MessageFormat
internally to format the message.- key
the message key
- args
the message arguments
- returns
the formatted message, if this key was defined
- Definition Classes
- → Messages
Provides messages for a particular language.
This intended for use to carry both the messages and the current language, particularly useful in templates so that both can be captured by one parameter.
The lang (context)
The messages API