I wanted to add a “custom” button in dokuwiki, so my template would have a clearly indicated link to the legal information (“mentions légales” in French).
html_btn($name,$id,$akey,$params,$method='get',$tooltip='')
$name : | important, this is concatenated to 'btn_' to use as a key in a lookup in the active lang file to obtain the label for the button. |
---|---|
* | must therefore ensure the label key/value pair is in the lang file. |
* | probably must also ensure it ($name) doesn't have any whitespace in it. |
$id : | page_name (I think), like 'mentions_legales' |
$akey : | access key (probably not always useful nor obvious). |
$params : | array('do' ⇒ 'show') |
$method='get' : | |
$tooltip='' : | skip, to remain language independent? |
lang.php
for each of the languages I (might) use: EN, FR:$lang['btn_legal'] = 'Legal';
$lang['btn_legal'] = 'Mentions Legales';
The labels added to lang.php
will be lost when the file is overwritten at the next version change! It seems there are few options for “fixing” this:
btn_legal
as a standard label in all language filesplugin
for this button, so the label can be separately maintained (seems like the wrong thing to do: overkill)