Packages

c

play.api.i18n

MessagesImpl

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
Linear Supertypes
Serializable, Product, Equals, Messages, MessagesProvider, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. MessagesImpl
  2. Serializable
  3. Product
  4. Equals
  5. Messages
  6. MessagesProvider
  7. AnyRef
  8. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new MessagesImpl(lang: Lang, messagesApi: MessagesApi)

    lang

    The lang (context)

    messagesApi

    The messages API

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. 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
    MessagesImplMessages
  5. 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
    MessagesImplMessages
  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def asJava: i18n.Messages

    returns

    the Java version for this Messages.

    Definition Classes
    MessagesImplMessages
  8. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  9. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  10. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  11. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  12. 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
    MessagesImplMessages
  13. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  14. val lang: Lang

    Returns the language associated with the messages.

    Returns the language associated with the messages.

    returns

    the selected language.

    Definition Classes
    MessagesImplMessages
  15. def messages: Messages

    Every Messages is also a MessagesProvider.

    Every Messages is also a MessagesProvider.

    returns

    the messages itself.

    Definition Classes
    MessagesMessagesProvider
  16. val messagesApi: MessagesApi
  17. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  18. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  19. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  20. def productElementNames: Iterator[String]
    Definition Classes
    Product
  21. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  22. 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
    MessagesImplMessages
  23. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  24. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  25. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from Messages

Inherited from MessagesProvider

Inherited from AnyRef

Inherited from Any

Ungrouped