public class Lang
extends play.api.i18n.Lang
| Modifier and Type | Field and Description |
|---|---|
play.api.i18n.Lang |
underlyingLang |
| Constructor and Description |
|---|
Lang(play.api.i18n.Lang underlyingLang) |
| Modifier and Type | Method and Description |
|---|---|
static java.util.List<Lang> |
availables()
Deprecated.
Please use Lang.availables(app), since 2.5.0
|
static java.util.List<Lang> |
availables(Application app)
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(Application app,
java.util.List<Lang> langs)
Guess the preferred lang in the langs set passed as argument.
|
static Lang |
preferred(java.util.List<Lang> langs)
Deprecated.
Please use preferred(app, langs). Deprecated since 2.5.0.
|
java.util.Locale |
toLocale()
Convert to a Java Locale value.
|
public java.lang.String language()
language in class play.api.i18n.Langpublic java.lang.String country()
country in class play.api.i18n.Langpublic java.lang.String code()
code in class play.api.i18n.Langpublic java.util.Locale toLocale()
toLocale in class play.api.i18n.Langpublic boolean equals(java.lang.Object other)
equals in interface scala.Equalsequals in class play.api.i18n.Langpublic int hashCode()
hashCode in class play.api.i18n.Langpublic static Lang forCode(java.lang.String code)
code - the language code@Deprecated public static java.util.List<Lang> availables()
public static java.util.List<Lang> availables(Application app)
@Deprecated public static Lang preferred(java.util.List<Lang> langs)
langs - the set of langs from which to guess the preferredpublic static Lang preferred(Application app, java.util.List<Lang> langs)
langs - the set of langs from which to guess the preferred