I'm working on a project that requires the users to define multiple texts. These texts will be related to (for instance) an Account record. Based on which record it's linked to some merge-fields need to be filled in. Basically exactly the same as an e-mailtemplate, except that the source text is a custom field on a custom object.
Example: I have a custom merge text, which reads: "Hello {!Account.Name}, your total store credit has been altered to {!Account.Store_Credit__r.value}."
After the text is related to a specific account it should read: "Hello GenePoint, your total store credit has been altered to 250."
The text will be rendered on a VF page or maybe it'll be retrieved through the API. Is there any way to use merge-fields like this in Apex, without having to parse the text and replace them manually? I can't use formula fields, since the source texts are going to be maintained by non-technical people that do not know how to use formula's.