Package

play.api

i18n

Permalink

package i18n

Contains the internationalisation API.

For example, translating a message:

val msgString = Messages("items.found", items.size)
Source
package.scala
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. i18n
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. class DefaultLangs extends Langs

    Permalink
    Annotations
    @Singleton()
  2. class DefaultLangsProvider extends Provider[Langs]

    Permalink
    Annotations
    @Singleton()
  3. class DefaultMessagesApi extends MessagesApi

    Permalink

    The Messages API.

    The Messages API.

    Annotations
    @Singleton()
  4. class DefaultMessagesApiProvider extends Provider[MessagesApi]

    Permalink
    Annotations
    @Singleton()
  5. trait I18NSupportLowPriorityImplicits extends AnyRef

    Permalink

    Implicit conversions for using i18n with requests and results.

  6. trait I18nComponents extends AnyRef

    Permalink

    Injection helper for i18n components

  7. class I18nModule extends Module

    Permalink
  8. trait I18nSupport extends I18NSupportLowPriorityImplicits

    Permalink

    Brings convenient implicit conversions from play.api.mvc.RequestHeader to Messages.

    Brings convenient implicit conversions from play.api.mvc.RequestHeader to Messages.

    Example:

    import play.api.i18n.Messages
    class MyController(val messagesApi: MessagesApi ...)
      extends AbstractController(cc) with I18nSupport {
      val action = Action { implicit request =>
        val messageFromRequest = request.messages("hello.world")
        Ok(s"$messageFromRequest")
      }
    }
  9. case class Lang(locale: Locale) extends Product with Serializable

    Permalink

    A Lang supported by the application.

  10. trait LangImplicits extends AnyRef

    Permalink

    A trait for extracting a Messages instance from Langs

  11. trait Langs extends AnyRef

    Permalink

    Manages languages in Play

  12. trait Messages extends MessagesProvider

    Permalink

    A messages returns string messages using a chosen language.

    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( ... )
  13. trait MessagesApi extends AnyRef

    Permalink

    The internationalisation API.

  14. case class MessagesImpl(lang: Lang, messagesApi: MessagesApi) extends Messages with Product with Serializable

    Permalink

    Provides messages for a particular language.

    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

  15. trait MessagesImplicits extends AnyRef

    Permalink
  16. trait MessagesProvider extends AnyRef

    Permalink

    This trait is used to indicate when a Messages instance can be produced.

    This trait is used to indicate when a Messages instance can be produced.

    Annotations
    @implicitNotFound( ... )

Value Members

  1. object I18nSupport extends I18NSupportLowPriorityImplicits

    Permalink

    A static object with type enrichment for request and responses.

    A static object with type enrichment for request and responses.

    import I18nSupport._
  2. object Lang extends Serializable

    Permalink

    Utilities related to Lang values.

  3. object Messages extends MessagesImplicits

    Permalink

    Internationalisation API.

    Internationalisation API.

    For example:

    val msgString = Messages("items.found", items.size)

Inherited from AnyRef

Inherited from Any

Ungrouped