Package de.uplanet.lucy.server
Class ContextLanguage
java.lang.Object
de.uplanet.lucy.server.ContextLanguage
-
Method Summary
Modifier and TypeMethodDescriptionstatic Stringget(de.uplanet.lucy.server.connector.IServerBridgeRequest p_request, de.uplanet.lucy.server.session.ISession p_session) Get the language that's associated with the current execution context.static Stringget(IProcessingContext p_ctx) static Stringget(javax.servlet.http.HttpServletRequest p_request, de.uplanet.lucy.server.session.ISession p_session) Get the language that's associated with the current execution context.
-
Method Details
-
get
- Parameters:
p_ctx- The processing context (could benull). Get the language for the given processing context.- See Also:
-
get
public static String get(de.uplanet.lucy.server.connector.IServerBridgeRequest p_request, de.uplanet.lucy.server.session.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-Languageheader, 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 Intrexx format, for example de-ch
- the request's query string parameter
-
get
public static String get(javax.servlet.http.HttpServletRequest p_request, de.uplanet.lucy.server.session.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-Languageheader, 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 Intrexx format, for example de-ch
- the request's query string parameter
-