I'm writing a plugin that shows an error text under certain circumstances.
I edited the plugin configuration to allow the user whether to show a message at all, or none. Additionally, I wanted to allow the (admin) user to choose an error message via configuration:
$conf['show_error'] = true;
$conf['error_message'] = "ERROR!"
$meta['show_error'] = array('onoff');
$meta['error_message'] = array('string');
Is there a way to localize the default message for conf entry
I did not expect this to work, but I tried:
$conf['error_message'] = $lang['error_message'];
$conf['error_message'] = $this->getLang('error_message');
$conf['error_message'] = $this->getConf('error_message');
conf/default.php, but as expected, this does not work. (Surprisingly, it just took the raw code into the config string, e.g.
I read some other plugins' conf section code that was roughly comparable to my use case, but I only found plugins that contained raw texts (mostly in English).
Any hints would be highly appreciated.