UNSUBSCRIBE. Thanks! Austin Biggs
> On Sep 21, 2016, at 2:33 PM, Brendan <bren...@tucows.com> wrote: > > how is the sub function getting called? you may need to pass $this > through to it.. here's how that works with register_action: > > function init() { > $this->load_config(); > $this->add_texts('localization/', true); > $this->register_action('plugin.thing', array($this, 'thing')); > } > > function thing($args) { > $rcmail = rcube::get_instance(); > $this->gettext('somelabel_from_my_lang.inc_file') > } > >> On 16-09-21 01:27 PM, Aurélio de Souza Ribeiro Neto wrote: >> Hello Everyone, >> >> I have a plugin, and I want to translate it based on >> localization/language.inc file. >> >> In my plugin core PHP file I have this: >> >> function init() >> { >> $this->load_config(); >> $this->add_texts('localization/', true); >> } >> >> >> If in a sub function I use >> >> $this->gettext('somelabel_from_my_lang.inc_file') >> >> I got this error PHP Fatal error: Using $this when not in object >> context >> >> What I'm doing wrong? >> >> Thanks >> >> Aurelio >> >> >> _______________________________________________ >> Roundcube Development discussion mailing list >> dev@lists.roundcube.net >> http://lists.roundcube.net/mailman/listinfo/dev > _______________________________________________ > Roundcube Development discussion mailing list > dev@lists.roundcube.net > http://lists.roundcube.net/mailman/listinfo/dev
_______________________________________________ Roundcube Development discussion mailing list dev@lists.roundcube.net http://lists.roundcube.net/mailman/listinfo/dev