reuploading files
[squirrelmail.git] / plugins / translate / setup.php
1 <?php
2 /**
3 * setup.php
4 *
5 * Easy plugin that sends the body of the message to a new browser
6 * window using the specified translator.
7 *
8 * Translation of composed messages is not supported.
9 *
10 * Copyright (c) 1999-2004 The SquirrelMail Project Team
11 * Licensed under the GNU GPL. For full terms see the file COPYING.
12 *
13 * @version $Id$
14 * @package plugins
15 * @subpackage translate
16 */
17
18 /**
19 * If SM_PATH isn't defined, define it.
20 * @ignore
21 */
22 if (!defined('SM_PATH')) {
23 define('SM_PATH','../../');
24 }
25
26 /**
27 * Initialize the translation plugin
28 * @return void
29 * @access private
30 */
31 function squirrelmail_plugin_init_translate() {
32 global $squirrelmail_plugin_hooks;
33
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';
40 }
41
42 /**
43 * Shows translation box in message display window
44 * @access private
45 */
46 function translate_read_form() {
47 include_once(SM_PATH . 'plugins/translate/functions.php');
48 translate_read_form_function();
49 }
50
51 /**
52 * Should add translation options in compose window
53 *
54 * Unimplemented
55 * @access private
56 */
57 function translate_button() {
58 include_once(SM_PATH . 'plugins/translate/functions.php');
59 translate_button_function();
60 }
61
62 /**
63 * Calls translation option block function
64 * @access private
65 */
66 function translate_optpage_register_block() {
67 include_once(SM_PATH . 'plugins/translate/functions.php');
68 translate_optpage_function();
69 }
70
71 /**
72 * Calls user's translation preferences function
73 * @access private
74 */
75 function translate_pref() {
76 include_once(SM_PATH . 'plugins/translate/functions.php');
77 translate_pref_function();
78 }
79
80 /**
81 * Calls user's translation preferences saving function
82 * @access private
83 */
84 function translate_save() {
85 include_once(SM_PATH . 'plugins/translate/functions.php');
86 translate_save_function();
87 }
88
89 /**
90 * Calls user's translation preferences set_loadinfo function
91 * @access private
92 */
93 function translate_set_loadinfo() {
94 include_once(SM_PATH . 'plugins/translate/functions.php');
95 translate_set_loadinfo_function();
96 }
97 ?>