introduce translateDocument