6 * Easy plugin that sends the body of the message to a new browser
7 * window using the specified translator.
9 * Translation of composed messages is not supported.
11 * @copyright © 1999-2007 The SquirrelMail Project Team
12 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
15 * @subpackage translate
20 * Initialize the translation plugin
24 function squirrelmail_plugin_init_translate() {
25 global $squirrelmail_plugin_hooks;
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';
36 * Shows translation box in message display window
39 function translate_read_form() {
40 include_once(SM_PATH
. 'plugins/translate/functions.php');
41 translate_read_form_function();
45 * Should add translation options in compose window
50 function translate_button() {
51 include_once(SM_PATH
. 'plugins/translate/functions.php');
52 translate_button_function();
56 * Calls translation option block function
59 function translate_optpage_register_block() {
60 include_once(SM_PATH
. 'plugins/translate/functions.php');
61 translate_optpage_function();
65 * Calls user's translation preferences function
68 function translate_pref() {
69 include_once(SM_PATH
. 'plugins/translate/functions.php');
70 translate_pref_function();
74 * Calls user's translation preferences saving function
77 function translate_save() {
78 include_once(SM_PATH
. 'plugins/translate/functions.php');
79 translate_save_function();
83 * Calls user's translation preferences set_loadinfo function
86 function translate_set_loadinfo() {
87 include_once(SM_PATH
. 'plugins/translate/functions.php');
88 translate_set_loadinfo_function();