|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object play.i18n.Lang
public class Lang
Language support
Field Summary | |
---|---|
static java.lang.ThreadLocal<java.lang.String> |
current
|
Constructor Summary | |
---|---|
Lang()
|
Method Summary | |
---|---|
static void |
change(java.lang.String locale)
Change language for next requests |
static java.lang.String |
get()
Retrieve the current language or null |
static java.util.Locale |
getLocale()
|
static java.util.Locale |
getLocale(java.lang.String lang)
|
static void |
resolvefrom(Http.Request request)
Guess the language for current request in the following order: if a PLAY_LANG cookie is set, use this value if Accept-Language header is set, use it only if the Play! application allows it. supported language may be defined in application configuration, eg : play.langs=fr,en,de) otherwise, server's locale language is assumed |
static boolean |
set(java.lang.String locale)
Force the current language |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static java.lang.ThreadLocal<java.lang.String> current
Constructor Detail |
---|
public Lang()
Method Detail |
---|
public static java.lang.String get()
public static boolean set(java.lang.String locale)
locale
- (fr, ja, it ...)
public static void change(java.lang.String locale)
locale
- (fr, ja, it ...)public static void resolvefrom(Http.Request request)
request
- public static java.util.Locale getLocale()
public static java.util.Locale getLocale(java.lang.String lang)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |