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 DefaultMessagesApi extends MessagesApi

    Permalink

    The internationalisation API.

    The internationalisation API.

    Annotations
    @Singleton()
  3. trait I18NSupportLowPriorityImplicits extends AnyRef

    Permalink
  4. trait I18nComponents extends AnyRef

    Permalink

    Injection helper for i18n components

  5. class I18nModule extends Module

    Permalink
  6. trait I18nSupport extends I18NSupportLowPriorityImplicits

    Permalink

    Brings a convenient implicit conversion from play.api.mvc.RequestHeader to Messages.

    Brings a convenient implicit conversion from play.api.mvc.RequestHeader to Messages.

    Example:

    import play.api.i18n.Messages
    class MyController(val messagesApi: MessagesApi) extends ControllerLike with I18nSupport {
      val action = Action { implicit request =>
        Ok(Messages("some.key")) // Uses the client’s preferred language
      }
    }
  7. case class Lang(locale: Locale) extends Product with Serializable

    Permalink

    A Lang supported by the application.

  8. trait Langs extends AnyRef

    Permalink

    Manages languages in Play

  9. case class Messages(lang: Lang, messages: MessagesApi) extends 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)

    messages

    The messages

  10. trait MessagesApi extends AnyRef

    Permalink

    The internationalisation API.

Value Members

  1. object Lang extends Serializable

    Permalink

    Utilities related to Lang values.

  2. object Messages extends Serializable

    Permalink

    Internationalisation API.

    Internationalisation API.

    For example:

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

Inherited from AnyRef

Inherited from Any

Ungrouped