You can retrieve strings from a resource library and then save them in properties using Custom Action. You can then use these properties to display text in dialogs.
But I would not recommend using this approach. If these lines are intended to be used only during installation, it is better to go to the WSX or WXL files: it is more simple and efficient.