Microsoft

API - Translator Text: How to avoid translation

There are many ways to prevent a piece of text from being translated:

(1) Escape to a Twitter tag @somethingtopassthrough or #somethingtopassthrough. Un-escape after translation.

(2) Use HTML and markup: Explained here.

Example:

<div class="notranslate">This will not be translated.</div>
<div>This will be translated. </div>

(3) Use the dynamic dictionary: https://docs.microsoft.com/en-us/azure/cognitive-services/translator/dynamic-dictionary. This way you can also prescribe a specific translation.

(4) Do not pass the string to translation.

(5) Custom Translator: Coming soon - Use a dictionary in Custom Translator to prescribe the translation of a phrase with 100% probability. 

(6) Translator Hub: Use an Excel file as dictionary, which has the language ID in row 1, and the phrases to not translate in columns A and B.

Last updated July 12, 2018

Feedback and Knowledge Base