[dokuwiki] Re: btn_html and lang definition
- From: Anika Henke <anika@xxxxxxxxxxxxxxx>
- To: dokuwiki@xxxxxxxxxxxxx
- Date: Wed, 25 Feb 2009 21:46:38 +0000
Michael Klier wrote:
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.
Hmm ... why does it work in my template (ach) then?
print html_btn('back',$backID,'',array());
Oh, I see. You tried all the time to put the translation into the
html_btn() ... You just need to give it a name 'somestring' and have
$lang['btn_somestring'] = 'Foo Bar'; in your template's <lang>/lang.php. Anika -- DokuWiki mailing list - more info at http://wiki.splitbrain.org/wiki:mailinglist
- Follow-Ups:
- [dokuwiki] Re: btn_html and lang definition
- From: Anika Henke
- [dokuwiki] Re: btn_html and lang definition
- References:
- [dokuwiki] btn_html and lang definition
- From: cyrille giquello
- [dokuwiki] Re: btn_html and lang definition
- From: Michael Klier
- [dokuwiki] Re: btn_html and lang definition
- From: cyrille giquello
- [dokuwiki] Re: btn_html and lang definition
- From: Michael Klier
- [dokuwiki] btn_html and lang definition
Other related posts:
- » [dokuwiki] btn_html and lang definition - cyrille giquello
- » [dokuwiki] Re: btn_html and lang definition - Michael Klier
- » [dokuwiki] Re: btn_html and lang definition - cyrille giquello
- » [dokuwiki] Re: btn_html and lang definition - Michael Klier
- » [dokuwiki] Re: btn_html and lang definition - Anika Henke
- » [dokuwiki] Re: btn_html and lang definition - Anika Henke
- » [dokuwiki] Re: btn_html and lang definition - Michael Klier
- » [dokuwiki] Re: btn_html and lang definition - cyrille giquello
- » [dokuwiki] Re: btn_html and lang definition - Anika Henke
- » [dokuwiki] Re: btn_html and lang definition - cyrille giquello