I'm trying to find a way to customize the message displayed after a successful record has been saved in a custom component. Well not really the entire message, just the 'item' part. For instance if my component is titled Resources, I'd like the success message to display, 'resource saved' rather than 'item saved'. And in the list view when it displays: 'N_ITEMS_CHECKED_IN' I would also like to replace the 'ITEMS' part. I know I could just interpret this in the language file. But I would still like to know how to change it.
I know the $text_prefix
variable in the AdminModel
controls the prefix. I looked for something similar in the Joomla core files, but I couldn't find anything. Or maybe I just didn't look in the correct place.
Joomla\CMS\MVC\Model\AdminModel
. Or are you looking for something else?$text_prefix
doesn't replace the message 'item saved', even though it says it's used with controller messages. I've looked atJoomla\CMS\MVC\Model\AdminModel
and none of the variables correspond with replacing 'item' on messages. You're saying I can create a custom prefix to allow this?$text_prefix
?COM_REPORTS
. And in my language file I translate it to the official name of my component. This does get translated and rendered in various location in the component. However, it doesn't replace the 'item saved' text.