1b4432284b57f8e73cad68fd385db8590816f7a8
[squirrelmail.git] / plugins / translate / config-sample.php
1 <?php
2 /**
3 * SquirrelMail translate plugin sample configuration
4 *
5 * WARNING: This is only an example config. Don't use it for your
6 * configuration. Almisbar translation engine is not public.
7 *
8 * Copyright (c) 2004 The SquirrelMail Project Team
9 * Licensed under the GNU GPL. For full terms see the file COPYING.
10 *
11 * @version $Id$
12 * @package plugins
13 * @subpackage translate
14 */
15
16 global $translate_default_engine;
17 $translate_default_engine='babelfish';
18
19 global $translate_babelfish_enabled;
20 $translate_babelfish_enabled=true;
21
22 global $translate_go_enabled;
23 $translate_go_enabled=false;
24
25 // Provides same options as babelfish. disabled
26 global $translate_dictionary_enabled;
27 $translate_dictionary_enabled=false;
28
29 global $translate_google_enabled;
30 $translate_google_enabled=true;
31
32 global $translate_intertran_enabled;
33 $translate_intertran_enabled=true;
34
35 global $translate_promt_enabled;
36 $translate_promt_enabled=true;
37
38 // interface looks Greek to me :)
39 global $translate_otenet_enabled;
40 $translate_otenet_enabled=false;
41
42 global $translate_gpltrans_enabled;
43 $translate_gpltrans_enabled=true;
44
45 // we managed to start gpltrans server
46 global $translate_gpltrans_url;
47 $translate_gpltrans_url='http://www.example.com/cgi-bin/gplTrans';
48
49 global $disable_compose_translate;
50 $disable_compose_translate=true;
51
52 /** Custom translation engine setup */
53
54 /**
55 * Controls inclusion of custom translation engines.
56 *
57 * If you enable custon translation engines, you must include
58 * translate_custom(), translate_custom_showtrad() and
59 * $translate_custom_showoption() functions in your config.
60 */
61 global $translate_custom_enabled;
62 $translate_custom_enabled=true;
63
64 /**
65 * Add almisbar translation engine
66 */
67 function translate_form_custom($message) {
68 translate_new_form('http://www.almisbar.com/scripts/ata/txttrs.dll');
69 echo '<p align="center">';
70 echo '<input name="lang" type="hidden" value="eng" />';
71 echo '<input name="auth" type="hidden" value="no" />';
72 echo '<input name="text" type="hidden" value="' . $message . '" />';
73 echo 'Al Misbar: <input type="submit" class="button" value="' . _("Translate") . '" />';
74
75 echo '<br />';
76 echo _("Translation Theme:") . '&nbsp;';
77 echo '<select size="1" name="atatheme">'.
78 '<option value="0">' . "General" .
79 '<option value="M">' . "Entertainment & Music" .
80 '<option value="H">' . "Sport" .
81 '<option value="1">' . "Business" .
82 '<option value="2">' . "Medical Science" .
83 '<option value="3">' . "Engineering" .
84 '<option value="4">' . "Technology" .
85 '<option value="5">' . "Religion" .
86 '<option value="6">' . "Law & Order" .
87 '<option value="7">' . "Media & Journalism" .
88 '<option value="8">' . "Humanities" .
89 '<option value="9">' . "Agriculture" .
90 '<option value="A">' . "Military" .
91 '<option value="B">' . "Intelligence & Police" .
92 '<option value="C">' . "Politics & Diplomacy" .
93 '<option value="D">' . "Education" .
94 '<option value="E">' . "Industry" .
95 '<option value="F">' . "Oil & Minerals" .
96 '<option value="G">' . "Arts & Literature" .
97 '<option value="I">' . "Space & Astronomy" .
98 '<option value="J">' . "Food & Drink" .
99 '<option value="K">' . "Weather" .
100 '<option value="L">' . "Government" .
101 '<option value="N">' . "Science" .
102 '</select>';
103 echo '<br />';
104 echo '<input checked="checked" id="option1" name="options" type="checkbox" value="translit" />';
105 echo "Transliteration of abbreviations";
106 echo '<input checked="checked" id="option2" name="options" type="checkbox" value="abbr" />';
107 echo "Transliteration of proper nouns";
108 echo '<input name="vowels" type="checkbox" value="a" />';
109 echo "Show Harakat";
110 echo '</p>';
111
112 translate_table_end();
113 }
114
115 /**
116 * Add info about almisbar
117 *
118 * String is not translated, because config file might be different
119 */
120 function translate_custom_showtrad() {
121 translate_showtrad_internal( 'Al Misbar',
122 "English to Arabic translation (powered by Al-Mutarjim (TM) Al-Arabey and Al-Wafi v2 machine translation engine)",
123 'http://www.almisbar.com/' );
124 }
125
126 /**
127 * Add almisbar option
128 */
129 function translate_custom_showoption() {
130 translate_showoption_internal('server', 'custom', 'Al Misbar');
131 }
132 ?>