Mechanism of translation from one language to another is described in details -
Translation from scr-mode to ppl-mode it is a sample only, and this method may be used for other languages.
It is not only for translation from language to language, also it is possible to add code in generated functions for any goals.
I am ready to help in using this Code Generator for specific requirements.