Class

play.api.i18n

MessagesImpl

Related Doc: package i18n

Permalink

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

Instance Constructors

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

    Permalink

    lang

    The lang (context)

    messagesApi

    The messages API

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def apply(keys: Seq[String], args: Any*): String

    Permalink

    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

    Permalink

    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

    Permalink
    Definition Classes
    Any
  7. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  9. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  10. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  11. def isDefinedAt(key: String): Boolean

    Permalink

    Check if a message key is defined.

    Check if a message key is defined.

    key

    the message key

    returns

    a boolean

    Definition Classes
    MessagesImplMessages
  12. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  13. val lang: Lang

    Permalink

    The lang (context)

    The lang (context)

    Definition Classes
    MessagesImplMessages
  14. def messages: Messages

    Permalink

    Every Messages is also a MessagesProvider.

    Every Messages is also a MessagesProvider.

    returns

    the messages itself.

    Definition Classes
    MessagesMessagesProvider
  15. val messagesApi: MessagesApi

    Permalink

    The messages API

  16. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  17. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  18. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  19. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  20. def translate(key: String, args: Seq[Any]): Option[String]

    Permalink

    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
  21. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  22. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  23. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from Messages

Inherited from MessagesProvider

Inherited from AnyRef

Inherited from Any

Ungrouped