1*a495d34cSAndreas Boehler<?php 2*a495d34cSAndreas Boehler 3*a495d34cSAndreas Boehlerif(!defined('DOKU_INC')) die(); 4*a495d34cSAndreas Boehler 5*a495d34cSAndreas Boehlerclass action_plugin_davcal_jsinfo extends DokuWiki_Action_Plugin { 6*a495d34cSAndreas Boehler 7*a495d34cSAndreas Boehler function register(Doku_Event_Handler $controller) { 8*a495d34cSAndreas Boehler $controller->register_hook('DOKUWIKI_STARTED', 'AFTER', $this, 'add_jsinfo_information'); 9*a495d34cSAndreas Boehler } 10*a495d34cSAndreas Boehler 11*a495d34cSAndreas Boehler function add_jsinfo_information(&$event, $param) { 12*a495d34cSAndreas Boehler global $conf; 13*a495d34cSAndreas Boehler global $JSINFO; 14*a495d34cSAndreas Boehler 15*a495d34cSAndreas Boehler $lang = $conf['lang']; 16*a495d34cSAndreas Boehler 17*a495d34cSAndreas Boehler if(strpos($lang, "de") === 0) 18*a495d34cSAndreas Boehler { 19*a495d34cSAndreas Boehler $lc = 'de'; 20*a495d34cSAndreas Boehler } 21*a495d34cSAndreas Boehler else 22*a495d34cSAndreas Boehler { 23*a495d34cSAndreas Boehler $lc = 'en'; 24*a495d34cSAndreas Boehler } 25*a495d34cSAndreas Boehler 26*a495d34cSAndreas Boehler $JSINFO['plugin']['davcal']['language'] = $lc; 27*a495d34cSAndreas Boehler } 28*a495d34cSAndreas Boehler} 29