How can I modify the feedback message returned by joomla?

What method do I need to override in order to extend the functionality that renders this message?

enter image description here


It's a simple language string which can be overriden in the language manager. For that go to the Language Manager and there the "Overrides" submenu. Click the "New" button. You can use the search to find the language key you need to override. However I usually just search the ini files in the language directory directly.

In your specific case, the only one I found which is matching is from Smart Search. So you're looking to override COM_FINDER_N_ITEMS_PUBLISHED_1.

  • Thanks, Bakual for the answer I know that in language.ini I can overriden the value and yes I can navigate to the language directory and change the value. my concern now is how does joomla set the system messages? take a loot at this language string : COM_ARTICLE_FILES_N_ITEMS_PUBLISHED="%d Successfully published as you can see there is %d prefixed in the value string now I want to dynamicaly set the value of that string.
    – Voj
    May 28 '15 at 6:52
  • The message is generated in JControllerAdmin->publish() github.com/joomla/joomla-cms/blob/staging/libraries/legacy/… As you see it uses JText::plural() and it passes in the count as a second argument. JText::plural automatically creates a suffix to the language key, depending on the available plural forms in a given language. So in case there is only one item, it appends _1 to the key.
    – Bakual
    May 28 '15 at 7:08
  • Which part of my component to include that?
    – Voj
    May 28 '15 at 7:54
  • 1
    As long as your controller extends JControllerAdmin and calls the parent publish method (or doesn't override it), it will be handled automatically. The $this->text_prefix equals to the name of your component (eg COM_FOO) if not specified otherwise. Otherwise you need to do this call yourself similar to what JControllerAdmin does.
    – Bakual
    May 28 '15 at 8:49
  • ahaha this is great I use PHPStrom to jump for the class definition instead of using Sublime I need to find the path of that class. anyway thanks for this man.
    – Voj
    May 29 '15 at 3:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.