[dokuwiki] Re: btn_html and lang definition

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>

So the button's name has to exists in the language file has "btn_<button_name>".
And when I put it in the master language file it works !
It just does not work when I put it in the template's language file.

Cyrille.
>
> HTH,
>        Michael
>
> --
> Michael Klier
>
> www:    http://www.chimeric.de
> jabber: chi@xxxxxxxxxxxxxxxxxx
> key:    http://downloads.chimeric.de/chi.asc
> key-id: 0x8308F551
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (GNU/Linux)
>
> iD8DBQFJpU+WAuL1i4MI9VERAiuoAJ41n2Lxb0rpvPWtZQJwoRwnbr6XRwCfUxrp
> hg2cUVNcYHJgTsBgG8XVYUc=
> =WnVH
> -----END PGP SIGNATURE-----
>
>
--
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist

Other related posts: