| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * setup.php |
| 5 | * |
| 6 | * Easy plugin that sends the body of the message to a new browser |
| 7 | * window using the specified translator. |
| 8 | * |
| 9 | * Translation of composed messages is not supported. |
| 10 | * |
| 11 | * @copyright © 1999-2007 The SquirrelMail Project Team |
| 12 | * @license http://opensource.org/licenses/gpl-license.php GNU Public License |
| 13 | * @version $Id$ |
| 14 | * @package plugins |
| 15 | * @subpackage translate |
| 16 | */ |
| 17 | |
| 18 | |
| 19 | /** |
| 20 | * Initialize the translation plugin |
| 21 | * @return void |
| 22 | * @access private |
| 23 | */ |
| 24 | function squirrelmail_plugin_init_translate() { |
| 25 | global $squirrelmail_plugin_hooks; |
| 26 | |
| 27 | $squirrelmail_plugin_hooks['read_body_bottom']['translate'] = 'translate_read_form'; |
| 28 | $squirrelmail_plugin_hooks['optpage_register_block']['translate'] = 'translate_optpage_register_block'; |
| 29 | $squirrelmail_plugin_hooks['loading_prefs']['translate'] = 'translate_pref'; |
| 30 | $squirrelmail_plugin_hooks['options_save']['translate'] = 'translate_save'; |
| 31 | $squirrelmail_plugin_hooks['optpage_set_loadinfo']['translate'] = 'translate_set_loadinfo'; |
| 32 | // $squirrelmail_plugin_hooks['compose_button_row']['translate'] = 'translate_button'; |
| 33 | } |
| 34 | |
| 35 | /** |
| 36 | * Shows translation box in message display window |
| 37 | * @access private |
| 38 | */ |
| 39 | function translate_read_form() { |
| 40 | include_once(SM_PATH . 'plugins/translate/functions.php'); |
| 41 | translate_read_form_function(); |
| 42 | } |
| 43 | |
| 44 | /** |
| 45 | * Should add translation options in compose window |
| 46 | * |
| 47 | * Unimplemented |
| 48 | * @access private |
| 49 | */ |
| 50 | function translate_button() { |
| 51 | include_once(SM_PATH . 'plugins/translate/functions.php'); |
| 52 | translate_button_function(); |
| 53 | } |
| 54 | |
| 55 | /** |
| 56 | * Calls translation option block function |
| 57 | * @access private |
| 58 | */ |
| 59 | function translate_optpage_register_block() { |
| 60 | include_once(SM_PATH . 'plugins/translate/functions.php'); |
| 61 | translate_optpage_function(); |
| 62 | } |
| 63 | |
| 64 | /** |
| 65 | * Calls user's translation preferences function |
| 66 | * @access private |
| 67 | */ |
| 68 | function translate_pref() { |
| 69 | include_once(SM_PATH . 'plugins/translate/functions.php'); |
| 70 | translate_pref_function(); |
| 71 | } |
| 72 | |
| 73 | /** |
| 74 | * Calls user's translation preferences saving function |
| 75 | * @access private |
| 76 | */ |
| 77 | function translate_save() { |
| 78 | include_once(SM_PATH . 'plugins/translate/functions.php'); |
| 79 | translate_save_function(); |
| 80 | } |
| 81 | |
| 82 | /** |
| 83 | * Calls user's translation preferences set_loadinfo function |
| 84 | * @access private |
| 85 | */ |
| 86 | function translate_set_loadinfo() { |
| 87 | include_once(SM_PATH . 'plugins/translate/functions.php'); |
| 88 | translate_set_loadinfo_function(); |
| 89 | } |