RNN or CNN-based NMT captures relative positions which stem from sequential operation of RNN or convolution operation of CNN.
position embeddings or positional encodings (vector representations of positions) are used to handle absolute positions in Transformer.