function show_action($language = NULL) { $this->set_content_type('application/javascript; charset=UTF-8'); $modified = filemtime(dirname(__FILE__) . '/../views/localizations/show.php'); $this->response->add_header('Last-Modified', date("r", $modified)); if (isset($_SERVER['HTTP_IF_MODIFIED_SINCE'])) { if (strtotime($_SERVER['HTTP_IF_MODIFIED_SINCE']) === $modified) { $this->set_status(304, "Not modified."); $this->render_nothing(); return; } } $this->language = $language; setLocaleEnv($language, "studip"); // make this instance available to the view to use // the helper methods $this->plugin = $this; }
/** * switch i18n back to original language * * This function switches i18n system back to the original language. * Should be called after writing strings to other users via setTempLanguage(). * * @access public */ function restoreLanguage() { global $_language_domain, $_language; setLocaleEnv($_language, $_language_domain); }