/** * Display action * * If the controller was not dispatched manually load the langauges files * * @param KCommandContext A command context object * @return KDatabaseRow(set) A row(set) object containing the data to display */ protected function _actionGet(KCommandContext $context) { //Load the language file for HMVC requests who are not routed through the dispatcher if (!$this->isDispatched()) { JFactory::getLanguage()->load('com_' . $this->getIdentifier()->package); } return parent::_actionGet($context); }
/** * Display action * * This function will load the language files of the component if the controller was * not dispatched. * * @param KCommandContext A command context object * @return KDatabaseRow(set) A row(set) object containing the data to display */ protected function _actionGet(KCommandContext $context) { $this->getService('translator')->getTranslator($this->getIdentifier())->loadLanguageFiles(); return parent::_actionGet($context); }