The Messages API.
The Messages API.
Implicit conversions for using i18n with requests and results.
Injection helper for i18n components
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") } }
A Lang supported by the application.
A trait for extracting a Messages instance from Langs
Manages languages in Play
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.
The internationalisation API.
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.
The lang (context)
The messages API
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.
A static object with type enrichment for request and responses.
A static object with type enrichment for request and responses.
import I18nSupport._
Utilities related to Lang values.
Internationalisation API.
Internationalisation API.
For example:
val msgString = Messages("items.found", items.size)
Contains the internationalisation API.
For example, translating a message: