|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object play.api.i18n.Lang play.i18n.Lang
public class Lang
A Lang supported by the application.
Field Summary | |
---|---|
play.api.i18n.Lang |
underlyingLang
|
Constructor Summary | |
---|---|
Lang(play.api.i18n.Lang underlyingLang)
|
Method Summary | |
---|---|
static java.util.List<Lang> |
availables()
Retrieve Lang availables from the application configuration. |
java.lang.String |
code()
The Lang code (such as fr or en-US). |
java.lang.String |
country()
A valid ISO Country Code. |
boolean |
equals(java.lang.Object other)
|
static Lang |
forCode(java.lang.String code)
Create a Lang value from a code (such as fr or en-US). |
int |
hashCode()
|
java.lang.String |
language()
A valid ISO Language Code. |
static Lang |
preferred(java.util.List<Lang> langs)
Guess the preferred lang in the langs set passed as argument. |
java.util.Locale |
toLocale()
Convert to a Java Locale value. |
Methods inherited from class play.api.i18n.Lang |
---|
$lessinit$greater$default$2, apply, apply$default$2, availables, canEqual, copy, copy$default$1, copy$default$2, defaultLang, get, preferred, productArity, productElement, productIterator, productPrefix, satisfies, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public final play.api.i18n.Lang underlyingLang
Constructor Detail |
---|
public Lang(play.api.i18n.Lang underlyingLang)
Method Detail |
---|
public java.lang.String language()
language
in class play.api.i18n.Lang
public java.lang.String country()
country
in class play.api.i18n.Lang
public java.lang.String code()
code
in class play.api.i18n.Lang
public java.util.Locale toLocale()
toLocale
in class play.api.i18n.Lang
public boolean equals(java.lang.Object other)
equals
in interface scala.Equals
equals
in class play.api.i18n.Lang
public int hashCode()
hashCode
in class play.api.i18n.Lang
public static Lang forCode(java.lang.String code)
public static java.util.List<Lang> availables()
public static Lang preferred(java.util.List<Lang> langs)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |