Few days ago I was trying to include Joomla multilanguage system in my Simple Download Counter for Joomla 3 plugin. And I found that if I use string, which I override manually in  Extensions - Languages - Overrides menu , JText::_('Our overriden constant'); work fines. But if I set constant in LANG file of my extension and tried JText - I got zero result. So I decided to include Joomla 3 multilanguage system support in my plugin manually. 

What I`ve done, in my plugin firstly I get JFactory::getLanguage();

$lang = JFactory::getLanguage();

Then you must specify your plugin system name and from which Joomla language folder you want JText to look your language constants. JPATH_ADMINISTRATOR for administrator/language/ or JPATH_SITE /language. 


And now you can test it


Can anyone give me a better solution? smile

If you like this - share it with your friends. That would be the best "donation" for me!

Or just buy me a beer :-)

If you want to ask question or comment - login by using your favourite social network

Add comment

Answer a question:
You are a bot?