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.
|
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.
|
public java.lang.String language()
public java.lang.String country()
public java.lang.String code()
public java.util.Locale toLocale()
public boolean equals(java.lang.Object other)
public int hashCode()
public static Lang forCode(java.lang.String code)
public static java.util.List<Lang> availables()