Class ContextLanguage

java.lang.Object
de.uplanet.lucy.server.ContextLanguage

@Scriptable public final class ContextLanguage extends Object
  • Method Summary

    Modifier and Type
    Method
    Description
    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.
    static String
     
    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.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • get

      public static String get(IProcessingContext p_ctx)
      Parameters:
      p_ctx - The processing context (could be null). 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,

      1. the request's query string parameter QSVAR.RQ_LANG,
      2. the request's cookie COOKIE.LANG,
      3. the given session's SESSVAR.LANG,
      4. the given session user's defaultLanguage, if it exists,
      5. a language from the requests Accept-Language header, if applicable, or
      6. the value given by DefaultLanguage.get().

      Parameters:
      p_request - A request object, or null.
      p_session - A session object, or null.
      Returns:
      A language identifier, normalized in Intrexx format, for example de-ch
    • 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,

      1. the request's query string parameter QSVAR.RQ_LANG,
      2. the request's cookie COOKIE.LANG,
      3. the given session's SESSVAR.LANG,
      4. the given session user's defaultLanguage, if it exists,
      5. a language from the requests Accept-Language header, if applicable, or
      6. the value given by DefaultLanguage.get().

      Parameters:
      p_request - A request object, or null.
      p_session - A session object, or null.
      Returns:
      A language identifier, normalized in Intrexx format, for example de-ch