implicit class ResultWithLang extends AnyRef
Ordering
- Alphabetic
- By Inheritance
Inherited
- ResultWithLang
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- Protected
Instance Constructors
- new ResultWithLang(result: Result)(implicit messagesApi: MessagesApi)
Value Members
- def withLang(lang: Lang): Result
Sets the user's language permanently for future requests by storing it in a cookie.
Sets the user's language permanently for future requests by storing it in a cookie.
For example:
implicit val lang = Lang("fr-FR") Ok(Messages("hello.world")).withLang(lang)
- lang
the language to store for the user
- returns
the new result
- def withoutLang: Result
Reset the user's language by discarding the language cookie set by withLang
Reset the user's language by discarding the language cookie set by withLang
For example:
Ok(Messages("hello.world")).withoutLang
- returns
the new result
Adds convenient methods to handle the client-side language.
This class exists only for backward compatibility.