5 * Easy plugin that sends the body of the message to a new browser
6 * window using the specified translator.
8 * Translation of composed messages is not supported.
10 * Copyright (c) 1999-2005 The SquirrelMail Project Team
11 * Licensed under the GNU GPL. For full terms see the file COPYING.
15 * @subpackage translate
19 * If SM_PATH isn't defined, define it.
22 if (!defined('SM_PATH')) {
23 define('SM_PATH','../../');
27 * Initialize the translation plugin
31 function squirrelmail_plugin_init_translate() {
32 global $squirrelmail_plugin_hooks;
34 $squirrelmail_plugin_hooks['read_body_bottom']['translate'] = 'translate_read_form';
35 $squirrelmail_plugin_hooks['optpage_register_block']['translate'] = 'translate_optpage_register_block';
36 $squirrelmail_plugin_hooks['loading_prefs']['translate'] = 'translate_pref';
37 $squirrelmail_plugin_hooks['options_save']['translate'] = 'translate_save';
38 $squirrelmail_plugin_hooks['optpage_set_loadinfo']['translate'] = 'translate_set_loadinfo';
39 // $squirrelmail_plugin_hooks['compose_button_row']['translate'] = 'translate_button';
43 * Shows translation box in message display window
46 function translate_read_form() {
47 include_once(SM_PATH
. 'plugins/translate/functions.php');
48 translate_read_form_function();
52 * Should add translation options in compose window
57 function translate_button() {
58 include_once(SM_PATH
. 'plugins/translate/functions.php');
59 translate_button_function();
63 * Calls translation option block function
66 function translate_optpage_register_block() {
67 include_once(SM_PATH
. 'plugins/translate/functions.php');
68 translate_optpage_function();
72 * Calls user's translation preferences function
75 function translate_pref() {
76 include_once(SM_PATH
. 'plugins/translate/functions.php');
77 translate_pref_function();
81 * Calls user's translation preferences saving function
84 function translate_save() {
85 include_once(SM_PATH
. 'plugins/translate/functions.php');
86 translate_save_function();
90 * Calls user's translation preferences set_loadinfo function
93 function translate_set_loadinfo() {
94 include_once(SM_PATH
. 'plugins/translate/functions.php');
95 translate_set_loadinfo_function();