RoundCube (Live) Translator
What to translate
>labels.inc
>messages.inc
/>
Show translated texts
'; echo '
'; echo '
'; echo '
Label
Original
Translation
'; if ($lang != "_NEW_") @include(update_from_svn($lang, $file)); if (!empty($labels)) $edit_values = $labels; else if (!empty($messages)) $edit_values = $messages; else $edit_values = array(); $count = 0; foreach($orig_values as $t_key => $t_value) { // skip translated lines if(!$translated && !empty($edit_values[$t_key])) continue; if ($post_value = get_input_value('t_'.$t_key)) $edit_values[$t_key] = $post_value; echo '
\n"; echo '
'.htmlspecialchars($t_key).'
'; echo '
'.htmlspecialchars($t_value).'
'; echo '
'; echo "
\n
\n"; $count++; } if (!$count) echo '
No new texts to translate
'; echo "
\n"; echo '
'; } ?>
'."
Localization file
\n"; echo '
'; if ($fpath && ($fp = fopen($fpath, 'r'))) { while (!feof($fp)) { $line = fgets($fp); echo htmlspecialchars(str_replace('#lang', $lang, rtrim($line))) . "\n"; if (strstr($line, $array)) break; } } else { echo "<?php\n"; echo $array . " = array();\n"; } foreach($orig_values as $t_key => $t_value) { $t_value = get_input_value('t_'.$t_key); if (empty($t_value) && isset($edit_values[$t_key])) $t_value = $edit_values[$t_key]; if (!empty($t_value)) echo $array . "['$t_key'] = '" . addslashes(htmlspecialchars($t_value, ENT_COMPAT, 'UTF-8')) . "';\n"; } echo "\n?>
\n"; echo '
'; echo "\n
"; } ?>