info about newmail plugin
[squirrelmail.git] / plugins / translate / functions.php
index 3847af1cea9c92d93747d5710523607e9126387a..73bddfd4fdd62ed4b52ecfb2c1d1c872e7a91bba 100644 (file)
@@ -77,6 +77,7 @@ function translate_read_form_function() {
         $translate_promt_enabled, $translate_otenet_enabled;
     global $translate_custom_enabled;
 
+
     if (!$translate_show_read) {
         return;
     }
@@ -232,7 +233,7 @@ function translate_showoption() {
         $translate_dictionary_enabled, $translate_google_enabled,
         $translate_gpltrans_enabled, $translate_intertran_enabled,
         $translate_promt_enabled, $translate_otenet_enabled;
-    global $translate_custom_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');
@@ -426,7 +427,7 @@ function translate_lang_opt($from, $to, $value, $text) {
  * @access private
  */
 function translate_new_form($action) {
-    global $translate_dir, $translate_new_window, $translate_location;
+    global $translate_dir, $translate_location;
     global $color, $translate_same_window;
 
     echo '<form action="';
@@ -672,7 +673,13 @@ function translate_form_intertran($message) {
  * @access private
  */
 function translate_form_gpltrans($message) {
-    translate_new_form('http://www.translator.cx/cgi-bin/gplTrans');
+    global $translate_gpltrans_url;
+
+    // make sure that it is not empty
+    if ($translate_gpltrans_url=='')
+        $translate_gpltrans_url='http://www.translator.cx/cgi-bin/gplTrans';
+
+    translate_new_form($translate_gpltrans_url);
     echo '<select name="language">'.
         translate_lang_opt('', 'nl_NL', 'dutch_dict',      _("Dutch")).
         translate_lang_opt('', 'fr_FR', 'french_dict',     _("French")).