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()
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.
|
static Lang |
forCode(java.lang.String code)
Create a Lang value from a code (such as fr or en-US).
|
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.
|
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 static Lang forCode(java.lang.String code)
public static java.util.List<Lang> availables()