如何禁用 Google Translate API 不翻译专有名词和常用词

how to disable Google Translate API from not translating proper names with common words

我正在使用 Google Cloud Platform 创建印度地方语言的内容。一些内容包含建筑物和社会名称,这些名称具有 'The Nest Glory' 等常用词。从 Google 翻译 API 转换后,建筑物名称应该只用当地语言拼写,而不是逐字翻译。这听起来很有趣,用户永远也找不到那栋建筑。

经过一些搜索,我认为一种较旧的方法是使用音译 API,它被 google

所描述

Google Transliteration API Depricated

Cloud Translation API 可以告知不翻译部分文本,使用以下 HTML 标签:

<span translate="no"> </span>
<span class="notranslate"> </span>

此功能要求在 HTML 中提交源文本。

Access to the Cloud Translation API

How to Disable Google Translate from Translating Specific Words