Package de.uplanet.lucy.server
Class ContextLanguage
- java.lang.Object
-
- de.uplanet.lucy.server.ContextLanguage
-
@Scriptable public final class ContextLanguage extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
get(IServerBridgeRequest p_request, ISession p_session)
Get the language that's associated with the current execution context.static String
get(IProcessingContext p_ctx)
-
-
-
Method Detail
-
get
public static String get(IProcessingContext p_ctx)
- Parameters:
p_ctx
- The processing context (could benull
). Get the language for the given processing context.- See Also:
get(IServerBridgeRequest, ISession)
-
get
public static String get(IServerBridgeRequest p_request, ISession p_session)
Get the language that's associated with the current execution context.The returned value is given by, in order,
- the request's query string parameter
QSVAR.RQ_LANG
, - the request's cookie
COOKIE.LANG
, - the given session's
SESSVAR.LANG
, - the given session user's
defaultLanguage
, if it exists, - a language from the requests
Accept-Language
header, if applicable, or - the value given by
DefaultLanguage.get()
.
- Parameters:
p_request
- A request object, ornull
.p_session
- A session object, ornull
.- Returns:
- A language identifier, normalized in Intrexxformat, for example de-ch
- the request's query string parameter
-
-