$source, 'lang2' => $target, 'title1' => isset($lang1["localeid"]) ? $lang1["localeid"] : $source, 'title2' => isset($lang2["localeid"]) ? $lang2["localeid"] : $target ); if($stringid) { $translation = isset($lang2[$stringid]) ? $lang2[$stringid] : ""; if(isset($_POST['translation'])) { $translation = getparam('translation'); if(!$translation) { $errors[] = no_field("form.field.translation"); } if(count($errors) == 0) { if (get_magic_quotes_gpc()) { $translation = stripslashes($translation); } save_message($target, $stringid, $translation); $page['saved'] = true; start_html_output(); require('view/translate.php'); exit; } } $page['saved'] = false; $page['key'] = $stringid; $page['target'] = $target; $page['formoriginal'] = isset($lang1[$stringid]) ? $lang1[$stringid] : ""; $page['formtranslation'] = $translation; start_html_output(); require('view/translate.php'); exit; } $localesList = array(); foreach($available_locales as $loc) { $localesList[] = array("id" => $loc, "name" => getlocal_($loc, "names")); } $result = array(); $allkeys = array_keys($lang1); foreach($allkeys as $key) { $result[] = array('id' => $key, 'l1' => $lang1[$key], 'l2' => (isset($lang2[$key]) ? $lang2[$key] : "absent") ); } setup_pagination($result,100); $page['formtarget'] = $target; $page['formsource'] = $source; $page['availableLocales'] = $localesList; start_html_output(); require('view/translatelist.php'); ?>