Fixed the translateString method.