Reputation: 37
I have created joomla module mod_my
. module consists of mod_sign_up_courses.php, en-GB.mod_sign_up_courses.ini, default.php, helper.php, ...
If I write
echo JText::_('BACK_TITLE');
in default.php (template),
then it works.
If I write
echo JText::_('BACK_TITLE');
in helper.php
, then it doesn't work.
How correctly use internationalization in helper.php?
Upvotes: 1
Views: 140
Reputation: 2494
You must load manually your language file, as explained here for instance.
I quote:
/*load language file for plugin frontend*/
$lang = &JFactory::getLanguage();
$lang->load('plg_plg_pluginType_myPlugin', JPATH_ADMINISTRATOR);
Source: http://dreference.blogspot.co.uk/2012/04/how-to-load-language-file-for-joomla.html
Upvotes: 1