Hi, I'm Ahmad. I make websites with Joomla!

Welcome, Feel free to navigate my website and I will be glad to hear from you.

Latest news: Calendar Stamp is UPDATED!!! Version 1.5 is out!

Recommended Book

0523_Mastering_Joomla_1

Find more freelance jobs

What's going on twitter

14
Nov
2009
Outputing text in content plugins PDF Print E-mail

plugin 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! Smile