Hi,
I had a problem with the google translate api. The content I was trying to translate contained html tags, but some html content was also translated. For example:
I want to translate the content:
<br style="box-sizing: inherit; display: block; overflow-wrap: break-word;" />
The translated content:
<br style="box -sizing:继承;显示:块;overflow-wrap:break-word;" />
Styles like "letter-spacing" or "line-height" are also translated. How to solve this problem?
Can you try using the v2 endpoint?
The input text can be plain text or HTML. Cloud Translation - Basic does not translate any HTML tags in the input, only text that appears between the tags. The output retains the (untranslated) HTML tags, with the translated text between the tags to the extent possible due to differences between the source and target languages. The order of HTML tags in the output may differ from the order in the input text due to word order changes in the translation.
Reference: https://cloud.google.com/translate/docs/basic/translating-text