In a previous article I wrote about using JText method to output text from the language files. This week I was working on Calendar Stamp and moved all the text to external files. I discovered that JText doesn't work in content plugins unless you call the function getLanguage and load the language manually. Something like this should work:
$lang =& JFactory::getLanguage();
$lang->load('plg_content_plugin',JPATH_ADMINISTRATOR);
Now use JText wherever you want on your plugin an it should work! :)
|