849bdf42 |
1 | <?php |
15e6162e |
2 | /** |
3 | * setup.php |
4 | * |
20bc790c |
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 | * |
6c84ba1e |
10 | * Copyright (c) 1999-2005 The SquirrelMail Project Team |
15e6162e |
11 | * Licensed under the GNU GPL. For full terms see the file COPYING. |
12 | * |
87392775 |
13 | * @version $Id$ |
ea5f4b8e |
14 | * @package plugins |
15 | * @subpackage translate |
15e6162e |
16 | */ |
17 | |
20bc790c |
18 | /** |
19 | * If SM_PATH isn't defined, define it. |
20 | * @ignore |
21 | */ |
22 | if (!defined('SM_PATH')) { |
23 | define('SM_PATH','../../'); |
24 | } |
849bdf42 |
25 | |
ea5f4b8e |
26 | /** |
27 | * Initialize the translation plugin |
28 | * @return void |
87392775 |
29 | * @access private |
ea5f4b8e |
30 | */ |
849bdf42 |
31 | function squirrelmail_plugin_init_translate() { |
32 | global $squirrelmail_plugin_hooks; |
33 | |
34 | $squirrelmail_plugin_hooks['read_body_bottom']['translate'] = 'translate_read_form'; |
cbe5423b |
35 | $squirrelmail_plugin_hooks['optpage_register_block']['translate'] = 'translate_optpage_register_block'; |
849bdf42 |
36 | $squirrelmail_plugin_hooks['loading_prefs']['translate'] = 'translate_pref'; |
859f3947 |
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'; |
849bdf42 |
40 | } |
41 | |
bb3ecba2 |
42 | /** |
43 | * Shows translation box in message display window |
87392775 |
44 | * @access private |
ea526024 |
45 | */ |
849bdf42 |
46 | function translate_read_form() { |
20bc790c |
47 | include_once(SM_PATH . 'plugins/translate/functions.php'); |
48 | translate_read_form_function(); |
849bdf42 |
49 | } |
50 | |
ea526024 |
51 | /** |
20bc790c |
52 | * Should add translation options in compose window |
53 | * |
54 | * Unimplemented |
87392775 |
55 | * @access private |
ea526024 |
56 | */ |
849bdf42 |
57 | function translate_button() { |
20bc790c |
58 | include_once(SM_PATH . 'plugins/translate/functions.php'); |
59 | translate_button_function(); |
849bdf42 |
60 | } |
61 | |
ea526024 |
62 | /** |
20bc790c |
63 | * Calls translation option block function |
87392775 |
64 | * @access private |
ea526024 |
65 | */ |
cbe5423b |
66 | function translate_optpage_register_block() { |
20bc790c |
67 | include_once(SM_PATH . 'plugins/translate/functions.php'); |
68 | translate_optpage_function(); |
849bdf42 |
69 | } |
70 | |
ea526024 |
71 | /** |
20bc790c |
72 | * Calls user's translation preferences function |
87392775 |
73 | * @access private |
ea526024 |
74 | */ |
20bc790c |
75 | function translate_pref() { |
76 | include_once(SM_PATH . 'plugins/translate/functions.php'); |
77 | translate_pref_function(); |
702272dc |
78 | } |
859f3947 |
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 | } |
87392775 |
97 | ?> |