dumping translate plugin changes into cvs.
[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['compose_button_row']['translate'] = 'translate_button';
38 }
39
40 /**
41 * Shows translation box in message display window
42 * @access private
43 */
44 function translate_read_form() {
45 include_once(SM_PATH . 'plugins/translate/functions.php');
46 translate_read_form_function();
47 }
48
49 /**
50 * Should add translation options in compose window
51 *
52 * Unimplemented
53 * @access private
54 */
55 function translate_button() {
56 include_once(SM_PATH . 'plugins/translate/functions.php');
57 translate_button_function();
58 }
59
60 /**
61 * Calls translation option block function
62 * @access private
63 */
64 function translate_optpage_register_block() {
65 include_once(SM_PATH . 'plugins/translate/functions.php');
66 translate_optpage_function();
67 }
68
69 /**
70 * Calls user's translation preferences function
71 * @access private
72 */
73 function translate_pref() {
74 include_once(SM_PATH . 'plugins/translate/functions.php');
75 translate_pref_function();
76 }
77 ?>