trait Messages extends MessagesProvider

A messages returns string messages using a chosen language.

This is commonly backed by a MessagesImpl case class, but does extend Product and does not expose MessagesApi as part of its interface.

Annotations
@implicitNotFound()
Source
Messages.scala
Linear Supertypes
MessagesProvider, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Messages
  2. MessagesProvider
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Abstract Value Members

  1. abstract 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

  2. abstract 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

  3. abstract def asJava: i18n.Messages

    returns

    the Java version for this Messages.

  4. abstract 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

  5. abstract def lang: Lang

    Returns the language associated with the messages.

    Returns the language associated with the messages.

    returns

    the selected language.

  6. abstract 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

Concrete Value Members

  1. def messages: Messages

    Every Messages is also a MessagesProvider.

    Every Messages is also a MessagesProvider.

    returns

    the messages itself.

    Definition Classes
    MessagesProvider