Last change
on this file since 8050 was
5550,
checked in by grum, 15 years ago
|
Release 3.0.0 : the plugin has been completely rewritten
|
-
Property svn:executable set to
*
|
File size:
1.5 KB
|
Rev | Line | |
---|
[5550] | 1 | <?php |
---|
| 2 | |
---|
| 3 | /* ----------------------------------------------------------------------------- |
---|
| 4 | class name : GPCTranslate |
---|
| 5 | class version : 2.1.0 |
---|
| 6 | plugin version : 3.0.0 |
---|
| 7 | date : 2010-03-31 |
---|
| 8 | ------------------------------------------------------------------------------ |
---|
| 9 | author: grum at piwigo.org |
---|
| 10 | << May the Little SpaceFrog be with you >> |
---|
| 11 | ------------------------------------------------------------------------------ |
---|
| 12 | |
---|
| 13 | |
---|
| 14 | ------------------------------------------------------------------------------ |
---|
| 15 | |
---|
| 16 | :: HISTORY |
---|
| 17 | |
---|
| 18 | | release | date | |
---|
| 19 | | 2.1.0 | 2010/03/31 | * update class & functions names |
---|
| 20 | | | | |
---|
| 21 | | | | |
---|
| 22 | | | | |
---|
| 23 | | | | |
---|
| 24 | | | | |
---|
| 25 | |
---|
| 26 | ------------------------------------------------------------------------------ |
---|
| 27 | |
---|
| 28 | |
---|
| 29 | class call API in HTML header, and provide a .js file manage API call |
---|
| 30 | >> http://code.google.com/apis/ajaxlanguage/ |
---|
| 31 | |
---|
| 32 | - constructor |
---|
| 33 | |
---|
| 34 | ---------------------------------------------------------------------- */ |
---|
| 35 | class GPCTranslate |
---|
| 36 | { |
---|
| 37 | public function __construct() |
---|
| 38 | { |
---|
| 39 | add_event_handler('loc_end_page_header', array(&$this, 'loadJS')); |
---|
| 40 | } |
---|
| 41 | |
---|
| 42 | public function loadJS() |
---|
| 43 | { |
---|
| 44 | global $template; |
---|
| 45 | |
---|
| 46 | $googleload=' |
---|
| 47 | <script type="text/javascript" src="http://www.google.com/jsapi"></script> |
---|
| 48 | <script type="text/javascript" src="plugins/'.basename(dirname(__FILE__)).'/google_translate.js"></script>'; |
---|
| 49 | |
---|
| 50 | $template->append('head_elements', $googleload); |
---|
| 51 | } |
---|
| 52 | |
---|
| 53 | } //class |
---|
| 54 | |
---|
| 55 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.