$updatequery .= ", "; } $updatequery .= "('" . mysql_real_escape_string($result[$i]['vcvalue'], $link) . "','{$locale}', NULL)"; } perform_query($updatequery, $link); $result = select_multi_assoc($query, $link); } } mysql_close($link); return $result; } # locales $all_locales = get_available_locales(); $locales_with_label = array(); foreach ($all_locales as $id) { $locales_with_label[] = array('id' => $id, 'name' => getlocal_($id, "names")); } $page['locales'] = $locales_with_label; $lang = verifyparam("lang", "/^[\\w-]{2,5}\$/", ""); if (!$lang || !in_array($lang, $all_locales)) { $lang = in_array($current_locale, $all_locales) ? $current_locale : $all_locales[0]; } # groups $groupid = ""; if ($settings['enablegroups'] == '1') { $groupid = verifyparam("group", "/^\\d{0,8}\$/", ""); if ($groupid) { $group = group_by_id($groupid); if (!$group) { $errors[] = getlocal("page.group.no_such"); $groupid = "";
function get_locale_links($href) { global $current_locale; $localeLinks = array(); $allLocales = get_available_locales(); if (count($allLocales) < 2) { return null; } foreach ($allLocales as $k) { $localeLinks[$k] = getlocal_($k, "names"); } return $localeLinks; }
} } $page['saved'] = false; $page['key'] = $stringid; $page['target'] = $target; $page['formoriginal'] = isset($lang1[$stringid]) ? $lang1[$stringid] : "<b><unknown></b>"; $page['formtranslation'] = $translation; prepare_menu($operator, false); start_html_output(); require '../view/translate.php'; exit; } $localesList = array(); $allLocales = get_available_locales(); foreach ($allLocales as $loc) { $localesList[] = array("id" => $loc, "name" => getlocal_("localeid", $loc)); } $show = verifyparam("show", "/^(all|s1|s2|s3)\$/", "all"); $result = array(); $allkeys = array_keys($lang1); if ($show == 's1') { $allkeys = array_intersect($allkeys, load_idlist('level1')); } else { if ($show == 's2') { $allkeys = array_intersect($allkeys, load_idlist('level2')); } else { if ($show == 's3') { $allkeys = array_diff($allkeys, load_idlist('level1'), load_idlist('level2')); } } }