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-2004 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['compose_button_row']['translate'] = 'translate_button';
41 * Shows translation box in message display window
44 function translate_read_form() {
45 include_once(SM_PATH
. 'plugins/translate/functions.php');
46 translate_read_form_function();
50 * Should add translation options in compose window
55 function translate_button() {
56 include_once(SM_PATH
. 'plugins/translate/functions.php');
57 translate_button_function();
61 * Calls translation option block function
64 function translate_optpage_register_block() {
65 include_once(SM_PATH
. 'plugins/translate/functions.php');
66 translate_optpage_function();
70 * Calls user's translation preferences function
73 function translate_pref() {
74 include_once(SM_PATH
. 'plugins/translate/functions.php');
75 translate_pref_function();