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