translate() replaces a set of single characters (passed as a string) with another set of characters (also passed as a string), for example:
translate('abcdef', 'ace', 'XYZ') --> 'XbYdZf'
replace() replaces occurrences of a string of arbitrary length with another string:
replace('abcdef', 'bc', 'FOO') --> 'aFOOdef'