protected function _bootstrapTranslations()
 {
     $translate = new Zend_Translate('Array', ENGINEBLOCK_FOLDER_ROOT . '/languages/en.php', 'en');
     $translate->addTranslation(array('content' => ENGINEBLOCK_FOLDER_ROOT . '/languages/nl.php', 'locale' => 'nl'));
     // If the URL has &lang=nl in it or the lang var is posted, or a lang cookie was set, then use that locale
     $cookieLang = $this->_httpRequest->getCookie('lang');
     $getLang = $this->_httpRequest->getQueryParameter('lang');
     $postLang = $this->_httpRequest->getPostParameter('lang');
     $lang = null;
     if ($getLang) {
         $lang = strtolower($getLang);
     } else {
         if ($postLang) {
             $lang = strtolower($postLang);
         } else {
             $lang = strtolower($cookieLang);
         }
     }
     $langCookieConfig = $this->getConfigurationValue('cookie')->lang;
     $cookieDomain = $langCookieConfig->domain;
     $cookieExpiry = null;
     if (isset($langCookieConfig->expiry) && $langCookieConfig->expiry > 0) {
         $cookieExpiry = time() + $langCookieConfig->expiry;
     }
     if ($lang && $translate->getAdapter()->isAvailable($lang)) {
         $translate->setLocale($lang);
         $this->_httpResponse->setCookie('lang', $lang, $cookieExpiry, '/', $cookieDomain);
     } else {
         $translate->setLocale('en');
         $this->_httpResponse->setCookie('lang', 'en', $cookieExpiry, '/', $cookieDomain);
     }
     $this->_translator = $translate;
 }
 protected function _processProxyServerResponseBody(EngineBlock_Http_Response $response)
 {
     $proxyOutput = $this->_proxyServer->getOutput();
     $response->setBody($proxyOutput);
 }
 protected function _bootstrapHttpCommunication()
 {
     $httpRequest = EngineBlock_Http_Request::createFromEnvironment();
     $this->_application->getLogInstance()->info(sprintf('Handling incoming request: %s %s', $httpRequest->getMethod(), $httpRequest->getUri()));
     $this->_application->setHttpRequest($httpRequest);
     $response = new EngineBlock_Http_Response();
     $response->setHeader('Strict-Transport-Security', 'max-age=15768000; includeSubDomains');
     // workaround, P3P is needed to support iframes like iframe gadgets in portals
     $response->setHeader('P3P', self::P3P_HEADER);
     $this->_application->setHttpResponse($response);
 }