TheWebGuy
TheWebGuy

Reputation: 12545

Prevent certain words from being translated

Hello I am using the bing translation api. Sometimes there are words I'd like to prevent from being translated because it is a company name, etc.

For example I'd like to prevent translation of the words "the north face". Is this possible to do?

Upvotes: 0

Views: 863

Answers (2)

goamn
goamn

Reputation: 2126

The answer from Swetha Machanavajhala is a good start however you also need to include textType=html in your API call query parameter to ensure all other tag attributes are ignored and not translated. Also it's better to use <span> to avoid breaking up the translation into multiple sentences (and thereby losing context).

Full answer here: https://stackoverflow.com/a/74873245/712700

Upvotes: 0

Swetha Machanavajhala
Swetha Machanavajhala

Reputation: 28

Yes, you can prevent translation using the following approaches listed in this documentation - https://learn.microsoft.com/en-us/azure/cognitive-services/translator/prevent-translation. Hope this helps.

Upvotes: 0

Related Questions