Localized

com.osinka.i18n.Localized
See theLocalized companion object
trait Localized[T]

An entity's preferred language.

A convenient type class to represent a preferred language of a user or session or whatever.

Use it in the companion object:

case class User(id: Int, lang: Lang)

object User {
 implicit object localized extends Localized[User] {
   override def locale(user: User) = user.lang
 }
}

Attributes

See also
Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Abstract methods

def locale(a: T): Lang
Implicitly added by optionLocalized
def locale(a: T): Lang