play.api

i18n

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
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. class DefaultLangs extends Langs

    Annotations
    @Singleton()
  2. class DefaultMessagesApi extends MessagesApi

    The internationalisation API.

    The internationalisation API.

    Annotations
    @Singleton()
  3. trait I18NSupportLowPriorityImplicits extends AnyRef

  4. trait I18nComponents extends AnyRef

    Injection helper for i18n components

  5. class I18nModule extends Module

  6. trait I18nSupport extends I18NSupportLowPriorityImplicits

    Brings a convenient implicit conversion from RequestHeader to Messages.

    Brings a convenient implicit conversion from 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(language: String, country: String = "") extends Product with Serializable

    A Lang supported by the application.

    A Lang supported by the application.

    language

    a valid ISO Language Code.

    country

    a valid ISO Country Code.

  8. trait Langs extends AnyRef

    Manages languages in Play

  9. case class Messages(lang: Lang, messages: MessagesApi) extends Product with Serializable

    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

    The internationalisation API.

Value Members

  1. object Lang extends Serializable

    Utilities related to Lang values.

  2. object Messages extends Serializable

    Internationalisation API.

    Internationalisation API.

    For example:

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

Inherited from AnyRef

Inherited from Any

Ungrouped