<?php
+/**
+ * setup.php
+ *
+ * Copyright (c) 1999-2003 The SquirrelMail Project Team
+ * Licensed under the GNU GPL. For full terms see the file COPYING.
+ *
+ * $Id$
+ */
+
/* Easy plugin that sends the body of the message to a new browser
window using the specified translator. It can also translate your
outgoing message if you send it to someone in a different country.
$squirrelmail_plugin_hooks['read_body_bottom']['translate'] = 'translate_read_form';
$squirrelmail_plugin_hooks['optpage_register_block']['translate'] = 'translate_optpage_register_block';
- $squirrelmail_plugin_hooks['options_save']['translate'] = 'translate_sav';
$squirrelmail_plugin_hooks['loading_prefs']['translate'] = 'translate_pref';
$squirrelmail_plugin_hooks['compose_button_row']['translate'] = 'translate_button';
}
$new_body = $body;
$pos = strpos($new_body,
- '">Download this as a file</A></CENTER><BR></SMALL>');
+ '">'. _("Download this as a file") . '</A></CENTER><BR></SMALL>');
if (is_int($pos)) {
$new_body = substr($new_body, 0, $pos);
}
-
- $trans = get_html_translation_table('HTMLENTITIES');
+
+ $trans = get_html_translation_table(HTML_ENTITIES);
$trans[' '] = ' ';
$trans = array_flip($trans);
$new_body = strtr($new_body, $trans);
);
}
-function translate_sav() {
- global $username,$data_dir;
- global $submit_translate, $translate_translate_server;
- global $translate_translate_location;
- global $translate_translate_show_read;
- global $translate_translate_show_send;
- global $translate_translate_same_window;
-
- if ($submit_translate) {
- if (isset($translate_translate_server)) {
- setPref($data_dir, $username, 'translate_server', $translate_translate_server);
- } else {
- setPref($data_dir, $username, 'translate_server', 'babelfish');
- }
-
- if (isset($translate_translate_location)) {
- setPref($data_dir, $username, 'translate_location', $translate_translate_location);
- } else {
- setPref($data_dir, $username, 'translate_location', 'center');
- }
-
- if (isset($translate_translate_show_read)) {
- setPref($data_dir, $username, 'translate_show_read', '1');
- } else {
- setPref($data_dir, $username, 'translate_show_read', '');
- }
-
- if (isset($translate_translate_show_send)) {
- setPref($data_dir, $username, 'translate_show_send', '1');
- } else {
- setPref($data_dir, $username, 'translate_show_send', '');
- }
-
- if (isset($translate_translate_same_window)) {
- setPref($data_dir, $username, 'translate_same_window', '1');
- } else {
- setPref($data_dir, $username, 'translate_same_window', '');
- }
-
- echo '<center>Translation options saved.</center>';
- }
-}
-
-
function translate_pref() {
global $username, $data_dir;
global $translate_server, $translate_location;
translate_lang_opt('', '', 'slo', _("Slovenian") . ' (CP 1250)').
translate_lang_opt('es', '', 'spa', _("Spanish")).
translate_lang_opt('sv', '', 'swe', _("Swedish")).
+ translate_lang_opt('', '', 'tur', _("Turkish") . ' (CP 1254)').
translate_lang_opt('', '', 'wel', _("Welsh")).
'</SELECT>';
translate_lang_opt('', '', 'slo', _("Slovenian") . ' (CP 1250)').
translate_lang_opt('', 'es', 'spa', _("Spanish")).
translate_lang_opt('', 'sv', 'swe', _("Swedish")).
+ translate_lang_opt('', '', 'tur', _("Turkish") . ' (CP 1254)').
translate_lang_opt('', '', 'wel', _("Welsh")).
'</SELECT>';
printf( _("%s to %s"), $left, $right );
sprintf( _("%s to %s"),
_("Spanish"),
_("English"))) .
- '<\SELECT>'.
+ '</SELECT>'.
'Dictionary.com: <INPUT TYPE="submit" VALUE="'._("Translate").'">';
translate_table_end();