Translator in sovereign (national) clouds

Azure sovereign clouds are isolated in-country/region platforms with independent authentication, storage, and compliance requirements. Sovereign clouds are often used within geographical boundaries where there's a strict data residency requirement. Translator is currently deployed in the China cloud:

Cloud Region identifier
Microsoft Azure operated by 21Vianet
  • chinaeast2 (East China 2)
  • chinanorth (China North)
  • chinanorth2 (China North 2)

Azure portal endpoints

The following table lists the base URLs for Azure sovereign cloud endpoints:

Sovereign cloud Azure portal endpoint
Azure portal China operated by 21 Vianet https://portal.azure.cn

Translator: Microsoft Azure operated by 21Vianet

The Microsoft Azure operated by 21Vianet cloud is a physical and logical network-isolated instance of cloud services located in China. In order to apply for an Microsoft Azure operated by 21Vianet account, you need a Chinese legal entity, Internet Content provider (ICP) license, and physical presence within China.

Microsoft Azure operated by 21Vianet Availability and support
Azure portal
Regions

The region-identifier is a required header when using a multi-service resource.
  • chinanorth
  • chinaeast2
  • chinanorth2
Supported Feature
Supported Languages

Endpoint

Base URL

Azure portal

https://portal.azure.cn

Authorization token

Replace the <region-identifier> parameter with the sovereign cloud identifier:

https://<region-identifier>.api.cognitive.azure.cn/sts/v1.0/issueToken

Text translation

https://api.translator.azure.cn/translate

Example text translation request

Translate a single sentence from English to Simplified Chinese.

Request

curl -X POST "https://api.translator.azure.cn/translate?api-version=3.0&from=en&to=zh-Hans" -H "Ocp-Apim-Subscription-Key: <client-secret>" -H "Content-Type: application/json; charset=UTF-8" -d "[{'Text': 'Hello, what is your name?'}]"

Response body

[
    {
        "translations":[
            {"text": "你好, 你叫什么名字?", "to": "zh-Hans"}
        ]
    }
]

Document Translation custom endpoint

https://<NAME-OF-YOUR-RESOURCE>.cognitiveservices.azure.cn/translator/text/batch/v1.0

Example batch translation request

{
    "inputs": [
        {
            "source": {
                "sourceUrl": "https://<storage_acount>.blob.core.chinacloudapi.cn/source-en?sv=2019-12-12&st=2021-03-05T17%3A45%3A25Z&se=2021-03-13T17%3A45%3A00Z&sr=c&sp=rl&sig=SDRPMjE4nfrH3csmKLILkT%2Fv3e0Q6SWpssuuQl1NmfM%3D"
            },
            "targets": [
                {
                    "targetUrl": "https://<storage_acount>.blob.core.chinacloudapi.cn/target-zh-Hans?sv=2019-12-12&st=2021-03-05T17%3A49%3A02Z&se=2021-03-13T17%3A49%3A00Z&sr=c&sp=wdl&sig=Sq%2BYdNbhgbq4hLT0o1UUOsTnQJFU590sWYo4BOhhQhs%3D",
                    "language": "zh-Hans"
                }
            ]
        }
    ]
}

Next steps