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 | * |
82d304a0 |
10 | * Copyright (c) 1999-2004 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'; |
20bc790c |
37 | // $squirrelmail_plugin_hooks['compose_button_row']['translate'] = 'translate_button'; |
849bdf42 |
38 | } |
39 | |
bb3ecba2 |
40 | /** |
41 | * Shows translation box in message display window |
87392775 |
42 | * @access private |
ea526024 |
43 | */ |
849bdf42 |
44 | function translate_read_form() { |
20bc790c |
45 | include_once(SM_PATH . 'plugins/translate/functions.php'); |
46 | translate_read_form_function(); |
849bdf42 |
47 | } |
48 | |
ea526024 |
49 | /** |
20bc790c |
50 | * Should add translation options in compose window |
51 | * |
52 | * Unimplemented |
87392775 |
53 | * @access private |
ea526024 |
54 | */ |
849bdf42 |
55 | function translate_button() { |
20bc790c |
56 | include_once(SM_PATH . 'plugins/translate/functions.php'); |
57 | translate_button_function(); |
849bdf42 |
58 | } |
59 | |
ea526024 |
60 | /** |
20bc790c |
61 | * Calls translation option block function |
87392775 |
62 | * @access private |
ea526024 |
63 | */ |
cbe5423b |
64 | function translate_optpage_register_block() { |
20bc790c |
65 | include_once(SM_PATH . 'plugins/translate/functions.php'); |
66 | translate_optpage_function(); |
849bdf42 |
67 | } |
68 | |
ea526024 |
69 | /** |
20bc790c |
70 | * Calls user's translation preferences function |
87392775 |
71 | * @access private |
ea526024 |
72 | */ |
20bc790c |
73 | function translate_pref() { |
74 | include_once(SM_PATH . 'plugins/translate/functions.php'); |
75 | translate_pref_function(); |
702272dc |
76 | } |
87392775 |
77 | ?> |