AWS translate removes href from HTML content it is translating


We are using AWS Translate API to translate HTML text. An example of the English string is:

<p>For more details, please refer to our <a href="">link 1</a> policy, <a href="">Sexual Harassment</a> policy, <a href="">link 2</a> policy, and <a href="">link 3 </a>through the links provided. </p>

When the translation is run, the links have had their href tag removed and in some instances the copy has been shifted around.

This seems to be a bug as we've performed translations previously with HTML links within sentences.

Does anyone have advice around translating HTML with links within it, or has experienced this problem before?

asked 6 months ago275 views
1 Answer


Let's suppose that you use the Translate API in Java.

Then, follow this documentation to see how to properly translate an HTML page when you read it:

It relies on parsing the page tree-like DOM structure to obtain text elements and translate them on the fly.



profile pictureAWS
answered 6 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions