Langs

play.api.i18n.Langs
trait Langs

Manages languages in Play

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class DefaultLangs

Members list

Value members

Abstract methods

The available languages.

The available languages.

These can be configured in application.conf, like so:

play.i18n.langs = ["fr", "en", "de"]

Attributes

Concrete methods

def asJava: Langs

Attributes

Returns

the Java version for this Langs.

def preferred(candidates: Seq[Lang]): Lang

Select a preferred language, given the list of candidates.

Select a preferred language, given the list of candidates.

Will select the preferred language, based on what languages are available, or return the default language if none of the candidates are available.

This implements the Matching of Language Tags specified in RFC 4647 section 3.4.

Value parameters

candidates

List of candidates ordered by user's preferences

Attributes