object Messages extends MessagesImplicits
Internationalisation API.
For example:
val msgString = Messages("items.found", items.size)
- Source
- Messages.scala
- Alphabetic
- By Inheritance
- Messages
- MessagesImplicits
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
trait
MessageSource extends AnyRef
A source for messages
- case class UrlMessageSource(url: URL) extends MessageSource with Product with Serializable
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*)(implicit provider: MessagesProvider): 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
-
def
apply(key: String, args: Any*)(implicit provider: MessagesProvider): 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
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
implicit
def
implicitMessagesProviderToMessages(implicit messagesProvider: MessagesProvider): Messages
- Definition Classes
- MessagesImplicits
-
def
isDefinedAt(key: String)(implicit provider: MessagesProvider): Boolean
Check if a message key is defined.
Check if a message key is defined.
- key
the message key
- returns
a boolean
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
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
parse(messageSource: MessageSource, messageSourceName: String): Either[ExceptionSource, Map[String, String]]
Parse all messages of a given input.
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
object
Attrs
Request Attributes for the MessagesApi Currently all Attributes are only available inside the MessagesApi methods.