"; } else { $en_flag = "en"; } $lang_flag_file = "mod/translation_editor/_graphics/flags/" . $current_language . ".png"; if(file_exists(elgg_get_root_path() . $lang_flag_file)){ $lang_flag = "" . elgg_echo($current_language)  . ""; } else { $lang_flag = $current_language; } $missing_count = 0; $equal_count = 0; $params_count = 0; $custom_count = 0; foreach($english as $en_key => $en_value){ $en_params = translation_editor_get_string_parameters($en_value); $cur_params = translation_editor_get_string_parameters($translated_language[$en_key]); if(!array_key_exists($en_key, $translated_language)){ $row_rel = "rel='missing'"; $missing_count++; } elseif($en_value == $translated_language[$en_key]){ $row_rel = "rel='equal'"; $equal_count++; } elseif($en_params != $cur_params){ $row_rel = "rel='params'"; $params_count++; } elseif(array_key_exists($en_key, $custom)){ $row_rel = "rel='custom'"; $custom_count++; } else { $row_rel = ""; } // English information $translation .= ""; $translation .= "" . $en_flag . ""; $translation .= ""; $translation .= ""; $translation .= "
" . nl2br(htmlspecialchars($en_value)) . "
"; $translation .=""; $translation .= ""; // Custom language information $translation .= ""; $translation .= "" . $lang_flag . ""; $translation .= ""; $translation .= ""; $translation .= ""; $translation .= ""; } $selected_view_mode = "missing"; if($missing_count == 0){ $selected_view_mode = "all"; ?> "; $toggle .= elgg_echo("translation_editor:plugin_edit:show") . " "; $missing_class = ""; $equal_class = ""; $params_class = ""; $custom_class = ""; $all_class = ""; switch($selected_view_mode){ case "missing": $missing_class = "view_mode_active"; break; case "all": $all_class = "view_mode_active"; break; case "equal": $equal_class = "view_mode_active"; break; case "custom": $custom_class = "view_mode_active"; break; case "params": $params_class = "view_mode_active"; break; } $toggle .= "" . elgg_echo("translation_editor:plugin_edit:show:missing") . " (" . $missing_count . "), "; $toggle .= "" . elgg_echo("translation_editor:plugin_edit:show:equal") . " (" . $equal_count . "), "; $toggle .= "" . elgg_echo("translation_editor:plugin_edit:show:params") . " (" . $params_count . "), "; $toggle .= "" . elgg_echo("translation_editor:plugin_edit:show:custom") . " (" . $custom_count . "), "; $toggle .= "" . elgg_echo("translation_editor:plugin_edit:show:all") . " (" . $vars['translation']['total'] . ")"; $toggle .= ""; $list .= ""; $list .= ""; $list .= ""; $list .= $translation; $list .= "
"; $list .= $toggle; $list .= elgg_echo("translation_editor:plugin_edit:title") . " " . $vars['plugin']; $list .= "
"; ?>
' /> elgg_echo("save"))); ?>