<span class=“notranslate”> in title

329 views
Skip to first unread message

Dingedi

unread,
Mar 20, 2021, 12:58:05 PM3/20/21
to Google Cloud Translation API
I have a problem with the Google Translate API, I cannot exclude elements in the title tag from being translated, and I am not reading anything that contraindicates in the documentation

<html> <head> <title>Title <span class="notranslate">{page_name}</span></title> </head> <body> <p>Hello</p> </body> </html>

 

Result:

<html> <head> <title>Título &lt;span class = &quot;notranslate&quot;&gt; {page_name} &lt;/span&gt;</title> </head> <body> <p>Hola</p> </body> </html>

Monica (Google Cloud Platform)

unread,
May 7, 2021, 4:04:20 PM5/7/21
to Google Cloud Translation API
Hello,
The example in our documentation doesn't have any HTML tags between the <title> tag. Can you remove

<span class="notranslate">{page_name}</span>
between the <title> .. </title> and see if it works?
It would be advisable to report this issue to the Product Team to take this usage into consideration.
Reply all
Reply to author
Forward
0 new messages