Compilers also translate code from one language to another, but the level of abstraction is very different between the two languages. For example, compile from .java to .class files.
ES6 and ES5
What does a translator do?
ES6 code => ES5 code (even ES4, ES3)