Why not, before sending the string to Google, replace the {$a} bits with something else (e.g. distinctive personal names that Google will not attempt to translate) and then do the reverse replacement on whatever you get back from Google?
Languages
Google translator integrated at lang.moodle.org
This discussion has been locked so you can no longer reply to it.