[dokuwiki] Re: language files in action plugins
- From: Chris Smith <chris@xxxxxxxxxxxxx>
- To: dokuwiki@xxxxxxxxxxxxx
- Date: Fri, 26 Jan 2007 03:41:02 +0000
Martin Tschofen wrote:
I'm stuck with using language files in an action plugin.
The action plugin replaces the current index. I cannot figure out how
I can
access the language settings when using
$this->getLang('name=of=the=property'); It always returns empty, no
error.
I'm even setting the locale in the constructor, even though getLang
should
do that anyway:
$this->setupLocale();
Here's how I retrieve the page_header within a function:
print $this->getLang('page_header');
page_header is in the lang/en/lang.php file as
$lang['page_header'] = 'Select and organize pages';
The same issue happens with
print p_locale_xhtml('index');
It always returns the index from the DW global language directory.
$this->lang only returns a blank array.
The same approach works just fine in an admin plugin.
Any idea what's different with action plugins and language settings?
Thanks...martin
There shouldn't be any difference, both inherit from the same base class
which provides the introspection, config and localisation methods. Are
you running develonly? Andi moved the base class from /lib/plugins into
/inc in a recent patch. Maybe something became broken.
Cheers,
Chris
--
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist
- Follow-Ups:
- [dokuwiki] Re: language files in action plugins
- From: Martin Tschofen
- References:
- [dokuwiki] language files in action plugins
- From: Martin Tschofen
Other related posts:
- » [dokuwiki] language files in action plugins
- » [dokuwiki] Re: language files in action plugins
- » [dokuwiki] Re: language files in action plugins
- » [dokuwiki] Re: language files in action plugins
- » [dokuwiki] Re: language files in action plugins
- » [dokuwiki] Re: language files in action plugins
- » [dokuwiki] Re: language files in action plugins
- » [dokuwiki] Re: language files in action plugins
- » [dokuwiki] Re: language files in action plugins
- » [dokuwiki] Re: language files in action plugins
I'm stuck with using language files in an action plugin.The action plugin replaces the current index. I cannot figure out how I can
access the language settings when using$this->getLang('name=of=the=property'); It always returns empty, no error.
I'm even setting the locale in the constructor, even though getLang should
do that anyway:
$this->setupLocale();
Here's how I retrieve the page_header within a function:
print $this->getLang('page_header');
page_header is in the lang/en/lang.php file as
$lang['page_header'] = 'Select and organize pages';
The same issue happens with
print p_locale_xhtml('index');
It always returns the index from the DW global language directory.
$this->lang only returns a blank array.
The same approach works just fine in an admin plugin.
Any idea what's different with action plugins and language settings?
Thanks...martin
- [dokuwiki] Re: language files in action plugins
- From: Martin Tschofen
- [dokuwiki] language files in action plugins
- From: Martin Tschofen