translate api implementation