| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * SquirrelMail translate plugin sample configuration |
| 5 | * |
| 6 | * WARNING: This is only an example config. Don't use it for your |
| 7 | * configuration. Almisbar translation engine is not public. |
| 8 | * |
| 9 | * @copyright 2004-2013 The SquirrelMail Project Team |
| 10 | * @license http://opensource.org/licenses/gpl-license.php GNU Public License |
| 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 | global $translate_custom_enabled; |
| 55 | $translate_custom_enabled=true; |
| 56 | |
| 57 | /** |
| 58 | * Add almisbar translation engine |
| 59 | */ |
| 60 | function translate_form_custom($message) { |
| 61 | translate_new_form('http://www.almisbar.com/scripts/ata/txttrs.dll'); |
| 62 | echo '<p align="center">'; |
| 63 | echo '<input name="lang" type="hidden" value="eng" />'; |
| 64 | echo '<input name="auth" type="hidden" value="no" />'; |
| 65 | echo '<input name="text" type="hidden" value="' . $message . '" />'; |
| 66 | echo 'Al Misbar: <input type="submit" class="button" value="' . _("Translate") . '" />'; |
| 67 | |
| 68 | echo '<br />'; |
| 69 | echo _("Translation Theme:") . ' '; |
| 70 | echo '<select size="1" name="atatheme">'. |
| 71 | '<option value="0">' . "General" . |
| 72 | '<option value="M">' . "Entertainment & Music" . |
| 73 | '<option value="H">' . "Sport" . |
| 74 | '<option value="1">' . "Business" . |
| 75 | '<option value="2">' . "Medical Science" . |
| 76 | '<option value="3">' . "Engineering" . |
| 77 | '<option value="4">' . "Technology" . |
| 78 | '<option value="5">' . "Religion" . |
| 79 | '<option value="6">' . "Law & Order" . |
| 80 | '<option value="7">' . "Media & Journalism" . |
| 81 | '<option value="8">' . "Humanities" . |
| 82 | '<option value="9">' . "Agriculture" . |
| 83 | '<option value="A">' . "Military" . |
| 84 | '<option value="B">' . "Intelligence & Police" . |
| 85 | '<option value="C">' . "Politics & Diplomacy" . |
| 86 | '<option value="D">' . "Education" . |
| 87 | '<option value="E">' . "Industry" . |
| 88 | '<option value="F">' . "Oil & Minerals" . |
| 89 | '<option value="G">' . "Arts & Literature" . |
| 90 | '<option value="I">' . "Space & Astronomy" . |
| 91 | '<option value="J">' . "Food & Drink" . |
| 92 | '<option value="K">' . "Weather" . |
| 93 | '<option value="L">' . "Government" . |
| 94 | '<option value="N">' . "Science" . |
| 95 | '</select>'; |
| 96 | echo '<br />'; |
| 97 | echo '<input checked="checked" id="option1" name="options" type="checkbox" value="translit" />'; |
| 98 | echo "Transliteration of abbreviations"; |
| 99 | echo '<input checked="checked" id="option2" name="options" type="checkbox" value="abbr" />'; |
| 100 | echo "Transliteration of proper nouns"; |
| 101 | echo '<input name="vowels" type="checkbox" value="a" />'; |
| 102 | echo "Show Harakat"; |
| 103 | echo '</p>'; |
| 104 | |
| 105 | translate_table_end(); |
| 106 | } |
| 107 | |
| 108 | /** |
| 109 | * Add info about almisbar |
| 110 | * |
| 111 | * String is not translated, because config file might be different |
| 112 | */ |
| 113 | function translate_custom_showtrad() { |
| 114 | translate_showtrad_internal( 'Al Misbar', |
| 115 | "English to Arabic translation (powered by Al-Mutarjim (TM) Al-Arabey and Al-Wafi v2 machine translation engine)", |
| 116 | 'http://www.almisbar.com/' ); |
| 117 | } |
| 118 | |
| 119 | /** |
| 120 | * Add almisbar option |
| 121 | */ |
| 122 | function translate_custom_showoption() { |
| 123 | translate_showoption_internal('server', 'custom', 'Al Misbar'); |
| 124 | } |