adding phpdoc tags. updating translation engines.
[squirrelmail.git] / plugins / translate / config-sample.php
CommitLineData
859f3947 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
16global $translate_default_engine;
17$translate_default_engine='babelfish';
18
19global $translate_babelfish_enabled;
20$translate_babelfish_enabled=true;
21
22global $translate_go_enabled;
23$translate_go_enabled=false;
24
25// Provides same options as babelfish. disabled
26global $translate_dictionary_enabled;
27$translate_dictionary_enabled=false;
28
29global $translate_google_enabled;
30$translate_google_enabled=true;
31
32global $translate_intertran_enabled;
33$translate_intertran_enabled=true;
34
35global $translate_promt_enabled;
36$translate_promt_enabled=true;
37
38// interface looks Greek to me :)
39global $translate_otenet_enabled;
40$translate_otenet_enabled=false;
41
42global $translate_gpltrans_enabled;
43$translate_gpltrans_enabled=true;
44
45// we managed to start gpltrans server
46global $translate_gpltrans_url;
47$translate_gpltrans_url='http://www.example.com/cgi-bin/gplTrans';
48
49global $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 * @example config-sample.php
61 * @global bool $translate_custom_enabled
62 */
63global $translate_custom_enabled;
64$translate_custom_enabled=true;
65
66/**
67 * Add almisbar translation engine
68 */
69function translate_form_custom($message) {
70 translate_new_form('http://www.almisbar.com/scripts/ata/txttrs.dll');
71 echo '<p align="center">';
72 echo '<input name="lang" type="hidden" value="eng" />';
73 echo '<input name="auth" type="hidden" value="no" />';
74 echo "<inpu name=\"text\" type=\"hidden\" value=\"$message\" />";
75 echo 'Al Misbar: <input type="submit" class=button value="' . _("Translate") . '" />';
76
77 echo '<br />';
78 echo _("Translation Theme:") . '&nbsp;';
79 echo '<select size="1" name="atatheme">'.
80 '<option value="0">' . "General" .
81 '<option value="M">' . "Entertainment & Music" .
82 '<option value="H">' . "Sport" .
83 '<option value="1">' . "Business" .
84 '<option value="2">' . "Medical Science" .
85 '<option value="3">' . "Engineering" .
86 '<option value="4">' . "Technology" .
87 '<option value="5">' . "Religion" .
88 '<option value="6">' . "Law & Order" .
89 '<option value="7">' . "Media & Journalism" .
90 '<option value="8">' . "Humanities" .
91 '<option value="9">' . "Agriculture" .
92 '<option value="A">' . "Military" .
93 '<option value="B">' . "Intelligence & Police" .
94 '<option value="C">' . "Politics & Diplomacy" .
95 '<option value="D">' . "Education" .
96 '<option value="E">' . "Industry" .
97 '<option value="F">' . "Oil & Minerals" .
98 '<option value="G">' . "Arts & Literature" .
99 '<option value="I">' . "Space & Astronomy" .
100 '<option value="J">' . "Food & Drink" .
101 '<option value="K">' . "Weather" .
102 '<option value="L">' . "Government" .
103 '<option value="N">' . "Science" .
104 '</select>';
105 echo '<br />';
106 echo '<input checked id="option1" name="options" type="checkbox" value="translit" />';
107 echo "Transliteration of abbreviations";
108 echo '<input checked id="option2" name="options" type="checkbox" value="abbr" />';
109 echo "Transliteration of proper nouns";
110 echo '<input name="vowels" type="checkbox" value="a" />';
111 echo "Show Harakat";
112 echo '</p>';
113
114 translate_table_end();
115}
116
117/**
118 * Add info about almisbar
119 *
120 * String is not translated, because config file might be different
121 */
122function translate_custom_showtrad() {
123 translate_showtrad_internal( 'Al Misbar',
124 "English to Arabic translation (powered by Al-Mutarjim (TM) Al-Arabey and Al-Wafi v2 machine translation engine)",
125 'http://www.almisbar.com/' );
126}
127
128/**
129 * Add almisbar option
130 */
131function translate_custom_showoption() {
132 translate_showoption_internal('server', 'custom', 'Al Misbar');
133}
134?>