Dotclear

source: plugins/translater/_prepend.php @ 1726

Revision 1726, 1.3 KB checked in by JcDenis, 14 years ago (diff)

translater 1.3:

  • Added babelfish help
  • Added behaviors on files writing
  • Fixed regexp again
  • Changed priority to .po files instead of .lang.php files
Line 
1<?php
2# -- BEGIN LICENSE BLOCK ----------------------------------
3# This file is part of translater, a plugin for Dotclear 2.
4#
5# Copyright (c) 2009 JC Denis and contributors
6# jcdenis@gdwd.com
7#
8# Licensed under the GPL version 2.0 license.
9# A copy of this license is available in LICENSE file or at
10# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
11# -- END LICENSE BLOCK ------------------------------------
12
13if (!defined('DC_RC_PATH')){return;}
14
15global $__autoload,$core;
16
17# Main class
18$__autoload['dcTranslater'] = dirname(__FILE__).'/inc/class.dc.translater.php';
19# Admin rest function
20$__autoload['translaterRest'] = dirname(__FILE__).'/inc/class.translater.rest.php';
21
22# google tools
23$__autoload['googleProposal'] = dirname(__FILE__).'/inc/lib.translater.google.php';
24$core->addBehavior('dcTranslaterAddProposal','addGoogleProposalTool');
25function addGoogleProposalTool($core,$proposal)
26{
27     $proposal->addTool(
28          'google','Google translation',array('googleProposal','init')
29     );
30}
31# yahoo babelfish tools
32$__autoload['babelfishProposal'] = dirname(__FILE__).'/inc/lib.translater.babelfish.php';
33$core->addBehavior('dcTranslaterAddProposal','addBabelfishProposalTool');
34function addBabelfishProposalTool($core,$proposal)
35{
36     $proposal->addTool(
37          'babelfish','Babelfish translation',array('babelfishProposal','init')
38     );
39}
40?>
Note: See TracBrowser for help on using the repository browser.

Sites map