Example #1
0
<?php 
translate_showtrad();
?>
   </ul>
   <p>
<?php 
echo _("You also decide if you want the translation box displayed, and where it will be located.") . '<form action="' . sqm_baseuri() . 'src/options.php" method="post">' . '<input type="hidden" name="optmode" value="submit" />' . '<input type="hidden" name="optpage" value="translate" />' . '<table border="0" cellpadding="0" cellspacing="2">' . '<tr><td align="right" style="white-space: nowrap;">' . _("Select your translator:") . '</td>' . '<td><select name="translate_translate_server">';
translate_showoption();
echo '</select>' . '</td></tr>' . '<tr>' . html_tag('td', _("When reading:"), 'right', '', 'style="white-space: nowrap;"') . '<td><input type="checkbox" name="translate_translate_show_read"';
if ($translate_show_read) {
    echo ' checked="checked"';
}
echo ' /> - ' . _("Show translation box") . ' <select name="translate_translate_location">';
translate_showoption_internal('location', 'left', _("to the left"));
translate_showoption_internal('location', 'center', _("in the center"));
translate_showoption_internal('location', 'right', _("to the right"));
echo '</select><br />' . '<input type="checkbox" name="translate_translate_same_window"';
if ($translate_same_window) {
    echo ' checked="checked"';
}
echo ' /> - ' . _("Translate inside the SquirrelMail frames") . "</td></tr>\n";
if (!$disable_compose_translate) {
    echo '<tr>' . html_tag('td', _("When composing:"), 'right', '', 'style="white-space: nowrap;"') . '<td><input type="checkbox" name="translate_translate_show_send"';
    if ($translate_show_send) {
        echo ' checked="checked"';
    }
    echo ' /> - ' . _("Not yet functional, currently does nothing") . "</td></tr>\n";
}
?>
<tr><td></td><td>
<input type="submit" value="<?php 
Example #2
0
/**
 * Add almisbar option
 */
function translate_custom_showoption()
{
    translate_showoption_internal('server', 'custom', 'Al Misbar');
}
Example #3
0
/**
 * Creates server selection options
 * @access private
 */
function translate_showoption()
{
    global $translate_babelfish_enabled, $translate_go_enabled, $translate_dictionary_enabled, $translate_google_enabled, $translate_gpltrans_enabled, $translate_intertran_enabled, $translate_promt_enabled, $translate_otenet_enabled;
    global $translate_custom_enabled, $translate_gpltrans_url;
    if ($translate_babelfish_enabled) {
        translate_showoption_internal('server', 'babelfish', 'Babelfish');
    }
    if ($translate_go_enabled) {
        translate_showoption_internal('server', 'go', 'Go.com');
    }
    if ($translate_dictionary_enabled) {
        translate_showoption_internal('server', 'dictionary', 'Dictionary.com');
    }
    if ($translate_google_enabled) {
        translate_showoption_internal('server', 'google', 'Google Translate');
    }
    if ($translate_gpltrans_enabled && $translate_gpltrans_url != '') {
        translate_showoption_internal('server', 'gpltrans', 'GPLTrans');
    }
    if ($translate_intertran_enabled) {
        translate_showoption_internal('server', 'intertran', 'Intertran');
    }
    if ($translate_otenet_enabled) {
        translate_showoption_internal('server', 'otenet', 'OTEnet');
    }
    if ($translate_promt_enabled) {
        translate_showoption_internal('server', 'promt', 'PROMT');
    }
    if ($translate_custom_enabled && function_exists('translate_custom_showoption')) {
        translate_custom_showoption();
    }
}