Added metadata support to translation routine