How to exclude specific words from google translation (Google Cloud Translation API)?

11,159 views
Skip to first unread message

Piotr K

unread,
Mar 22, 2021, 1:51:41 PM3/22/21
to Google Cloud Translation API

Is it possible to exclude specific words or content blocks from translation (Google Cloud Translation API)?

Or how can I mark a word that should not be translated?

What about proper names? Is it possible to somehow declare such proper names in the Google Glossary?

Junpei Zhou

unread,
Mar 22, 2021, 3:47:32 PM3/22/21
to Google Cloud Translation API
Hi there,

To avoid translating specific words, you can use html tag <span translate="no"> to wrap the words that you don't want to translate. A caveat is that in some situations it may affect translation quality (especially when the wrapped words are special tokens).

To force the translation on some specific words (for example, property name), you can use Glossary. Detailed instructions about creating and using glossaries could be found at https://cloud.google.com/translate/docs/advanced/glossary.

Best,
Junpei

Reply all
Reply to author
Forward
0 new messages