[dokuwiki] Re: [dokuwiki] Localize default plugin conf

  • From: Mykola Ostrovskyy <spambox03@xxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Fri, 15 Aug 2014 10:32:45 +0400

Hi,

> Is it possible to provide localized values for a plugin default 
> configuration? If yes, could you please point me to a documentation, or to a 
> plugin which uses this technic.

Not as elegant as one could wish, but there is an obvious workaround [1]. Leave 
the default empty and get the value from $lang instead:

    function _getColumnsTagName() {
        $tag = $this->getConf('kwcolumns');
        if ($tag == '') {
            $tag = $this->getLang('kwcolumns');
        }
        return $tag;
    }

Of course, it could be reworked into some generic method if you have lots of 
configuration parameters.

[1] https://code.google.com/p/dwp-forge/source/browse/#svn%2Ftrunk%2Fcolumns


Regards,
Mykola�.Z)"����x%��f������m����h��"�*+����X��X�

Other related posts:

  • » [dokuwiki] Re: [dokuwiki] Localize default plugin conf - Mykola Ostrovskyy