config_sample.php 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  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 &copy; 2004-2007 The SquirrelMail Project Team
  9. * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  10. * @version $Id$
  11. * @package plugins
  12. * @subpackage translate
  13. */
  14. global $translate_default_engine;
  15. $translate_default_engine='babelfish';
  16. global $translate_babelfish_enabled;
  17. $translate_babelfish_enabled=true;
  18. global $translate_go_enabled;
  19. $translate_go_enabled=false;
  20. // Provides same options as babelfish. disabled
  21. global $translate_dictionary_enabled;
  22. $translate_dictionary_enabled=false;
  23. global $translate_google_enabled;
  24. $translate_google_enabled=true;
  25. global $translate_intertran_enabled;
  26. $translate_intertran_enabled=true;
  27. global $translate_promt_enabled;
  28. $translate_promt_enabled=true;
  29. // interface looks Greek to me :)
  30. global $translate_otenet_enabled;
  31. $translate_otenet_enabled=false;
  32. global $translate_gpltrans_enabled;
  33. $translate_gpltrans_enabled=true;
  34. // we managed to start gpltrans server
  35. global $translate_gpltrans_url;
  36. $translate_gpltrans_url='http://www.example.com/cgi-bin/gplTrans';
  37. global $disable_compose_translate;
  38. $disable_compose_translate=true;
  39. /** Custom translation engine setup */
  40. global $translate_custom_enabled;
  41. $translate_custom_enabled=true;
  42. /**
  43. * Add almisbar translation engine
  44. */
  45. function translate_form_custom($message) {
  46. translate_new_form('http://www.almisbar.com/scripts/ata/txttrs.dll');
  47. echo '<p align="center">';
  48. echo '<input name="lang" type="hidden" value="eng" />';
  49. echo '<input name="auth" type="hidden" value="no" />';
  50. echo '<input name="text" type="hidden" value="' . $message . '" />';
  51. echo 'Al Misbar: <input type="submit" class="button" value="' . _("Translate") . '" />';
  52. echo '<br />';
  53. echo _("Translation Theme:") . '&nbsp;';
  54. echo '<select size="1" name="atatheme">'.
  55. '<option value="0">' . "General" .
  56. '<option value="M">' . "Entertainment & Music" .
  57. '<option value="H">' . "Sport" .
  58. '<option value="1">' . "Business" .
  59. '<option value="2">' . "Medical Science" .
  60. '<option value="3">' . "Engineering" .
  61. '<option value="4">' . "Technology" .
  62. '<option value="5">' . "Religion" .
  63. '<option value="6">' . "Law & Order" .
  64. '<option value="7">' . "Media & Journalism" .
  65. '<option value="8">' . "Humanities" .
  66. '<option value="9">' . "Agriculture" .
  67. '<option value="A">' . "Military" .
  68. '<option value="B">' . "Intelligence & Police" .
  69. '<option value="C">' . "Politics & Diplomacy" .
  70. '<option value="D">' . "Education" .
  71. '<option value="E">' . "Industry" .
  72. '<option value="F">' . "Oil & Minerals" .
  73. '<option value="G">' . "Arts & Literature" .
  74. '<option value="I">' . "Space & Astronomy" .
  75. '<option value="J">' . "Food & Drink" .
  76. '<option value="K">' . "Weather" .
  77. '<option value="L">' . "Government" .
  78. '<option value="N">' . "Science" .
  79. '</select>';
  80. echo '<br />';
  81. echo '<input checked="checked" id="option1" name="options" type="checkbox" value="translit" />';
  82. echo "Transliteration of abbreviations";
  83. echo '<input checked="checked" id="option2" name="options" type="checkbox" value="abbr" />';
  84. echo "Transliteration of proper nouns";
  85. echo '<input name="vowels" type="checkbox" value="a" />';
  86. echo "Show Harakat";
  87. echo '</p>';
  88. translate_table_end();
  89. }
  90. /**
  91. * Add info about almisbar
  92. *
  93. * String is not translated, because config file might be different
  94. */
  95. function translate_custom_showtrad() {
  96. translate_showtrad_internal( 'Al Misbar',
  97. "English to Arabic translation (powered by Al-Mutarjim (TM) Al-Arabey and Al-Wafi v2 machine translation engine)",
  98. 'http://www.almisbar.com/' );
  99. }
  100. /**
  101. * Add almisbar option
  102. */
  103. function translate_custom_showoption() {
  104. translate_showoption_internal('server', 'custom', 'Al Misbar');
  105. }