You have one way how to convert echoing messages without translation by gettext to echoing messages with translation by gettext:
If you know that all messages are represented by only one variable, for example $Message
, following way will be made relatively fast, else you would have to find all used echoing of any messages ... and do that manually (mostly if message is only one - and it is represented by text, not by variable holding that text).
In your editor to start global search (in all files) and then, to go file by file and use replacing - and set $Message
for search and _($Message)
for replacement ... unless your editor allows replacing in more files at the same time. Then you would do all replacement at one time.
I would not suggest to do this replacing directly in php.