function lang_icons_prepare() { $langarray = lang__get_public_langs(); foreach ($langarray as $tlang) { $tlang_icon = trim(load_language_symbol('lang_icon_base64', $tlang)); if ($tlang_icon) { echo '.langicon-' . $tlang . ':before { content:url(\'' . $tlang_icon . '\'); } '; } } }
function lang__select_lang($varname, $selected = "", $type = "all") { global $lang; switch ($type) { case "public": $sel_langs = lang__get_public_langs(); break; case "part": $sel_langs = lang__get_part_langs(); break; default: $sel_langs = get_languages(); } if (!$selected) { $selected = lang('lang'); } $lang_names = lang__get_language_names(); $out = ''; $out .= '<SELECT name="' . $varname . '">'; foreach ($sel_langs as $olang) { $out .= '<OPTION value="' . $olang . '"'; if ($olang == $selected) { $out .= ' SELECTED'; } $out .= '>' . $lang_names[$olang] . '</OPTION>'; } $out .= '</SELECT>'; return $out; }
if ($participant_id) { // get participant's language $participant = orsee_db_load_array("participants", $participant_id, "participant_id"); $_SESSION['pauthdata']['language'] = $participant['language']; unset($participant); $show_logged_in_menu = true; } } } if ($proceed) { // determine language for page if (!isset($_SESSION['pauthdata']['language']) || !$_SESSION['pauthdata']['language']) { $_SESSION['pauthdata']['language'] = $settings['public_standard_language']; } if (isset($_REQUEST['language'])) { $langarray = lang__get_public_langs(); if (in_array($_REQUEST['language'], $langarray)) { $_SESSION['pauthdata']['language'] = $_REQUEST['language']; } } $lang = load_language($_SESSION['pauthdata']['language']); } if ($proceed) { if (!in_array(thisdoc(), array('participant_create.php', 'captcha.php'))) { unset($_SESSION['subpool_id']); unset($_SESSION['rules']); } } if ($proceed) { // require participant login for the following pages $part_load = array("participant_edit.php", "participant_delete.php", "participant_show.php", "participant_show_mob.php", "participant_change_pw.php", "participant_logout.php");