case class MessagesImpl(lang: Lang, messagesApi: MessagesApi) extends Messages with Product with Serializable
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.
- lang
The lang (context)
- messagesApi
The messages API
- Source
- Messages.scala
- 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
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##(): Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- 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
- MessagesImpl → 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
- MessagesImpl → Messages
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def asJava: i18n.Messages
- returns
the Java version for this Messages.
- Definition Classes
- MessagesImpl → Messages
- def clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def isDefinedAt(key: String): Boolean
Check if a message key is defined.
Check if a message key is defined.
- key
the message key
- returns
a boolean
- Definition Classes
- MessagesImpl → Messages
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val lang: Lang
Returns the language associated with the messages.
Returns the language associated with the messages.
- returns
the selected language.
- Definition Classes
- MessagesImpl → Messages
- def messages: Messages
Every Messages is also a MessagesProvider.
Every Messages is also a MessagesProvider.
- returns
the messages itself.
- Definition Classes
- Messages → MessagesProvider
- val messagesApi: MessagesApi
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- 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
- MessagesImpl → Messages
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()