[dokuwiki] Re: btn_html and lang definition
- From: Michael Klier <chi@xxxxxxxxxxx>
- To: dokuwiki@xxxxxxxxxxxxx
- Date: Wed, 25 Feb 2009 15:58:29 +0100
On Wed, Feb 25, 2009 at 03:49:34PM +0100, cyrille giquello wrote:
> 2009/2/25 Michael Klier <chi@xxxxxxxxxxx>:
> > On Wed, Feb 25, 2009 at 02:35:44PM +0100, cyrille giquello wrote:
> >> Hello,
> >> When I add a button in main.php, the text of the button is only set
> >> when I put the translation in inc/lang/fr/lang.php.
> >> When I put the translation in lib/tpl/myTemplate/lang/fr/lang.php the
> >> button text is empty.
> >> Have you got an idea on the problem ?
> >
> > I assume you're using sth. like:
> >
> > html_btn($lang['somestring'], ...)
> >
> > to access template specific language strings you have to use:
> >
> > html_btn(tpl_getLang('somestring'), ...)
>
> Do you think it's the right way ?
> Because in inc/html.php the function html_btn() is :
>
> <code>
> function html_btn($name,$id,$akey,$params,$method='get',$tooltip=''){
> global $conf;
> global $lang;
> $label = $lang['btn_'.$name];
> ...
> </code>
Uhm, turns out the html_btn() function isn't as re-usable as I remembered.
That leaves only building the form yourself atm, maybe this should be changed
in the html_btn() function in furture releases.
--
Michael Klier
www: http://www.chimeric.de
jabber: chi@xxxxxxxxxxxxxxxxxx
key: http://downloads.chimeric.de/chi.asc
key-id: 0x8308F551
Other related posts: