I think this is a matter of string-manipulation
I think the Methods here:
http://help.sap.com/saphelp_erp60_sp/helpdata/en/79/c55479b3dc11d5993800508b6b8b11/content.htm
could proove to be helpful
The big Problem you will face is to 100% identify the segments, translate them and concatenate them back together.