Skip to content

Commit a2c5e6a

Browse files
committed
edit for pub
1 parent 6ba00d7 commit a2c5e6a

File tree

2 files changed

+19
-19
lines changed

2 files changed

+19
-19
lines changed

articles/cognitive-services/Translator/document-translation/how-to-guides/use-rest-api-programmatically.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ manager: nitinme
77
ms.service: cognitive-services
88
ms.subservice: translator-text
99
ms.topic: quickstart
10-
ms.date: 12/19/2022
10+
ms.date: 03/17/2023
1111
ms.author: lajanuar
1212
recommendations: false
1313
ms.devlang: csharp, golang, java, javascript, python
@@ -16,7 +16,7 @@ ms.custom: mode-other
1616

1717
# Use REST APIs programmatically
1818

19-
Document Translation is a cloud-based feature of the [Azure Translator](../../translator-overview.md) service. You can use the Document Translation API to asynchronously translate whole documents in [supported languages](../../language-support.md) and various [file formats](../overview.md#supported-document-formats) while preserving source document structure and text formatting. In this how-to guide, you'll learn to use Document Translation APIs with a programming language of your choice and the HTTP REST API.
19+
Document Translation is a cloud-based feature of the [Azure Translator](../../translator-overview.md) service. You can use the Document Translation API to asynchronously translate whole documents in [supported languages](../../language-support.md) and various [file formats](../overview.md#supported-document-formats) while preserving source document structure and text formatting. In this how-to guide, you learn to use Document Translation APIs with a programming language of your choice and the HTTP REST API.
2020

2121
## Prerequisites
2222

@@ -27,11 +27,11 @@ ms.custom: mode-other
2727
> * Document Translation is **only** supported in the S1 Standard Service Plan (Pay-as-you-go) or in the D3 Volume Discount Plan. _See_ [Cognitive Services pricing—Translator](https://azure.microsoft.com/pricing/details/cognitive-services/translator/).
2828
>
2929
30-
To get started, you'll need:
30+
To get started, you need:
3131

3232
* An active [**Azure account**](https://azure.microsoft.com/free/cognitive-services/). If you don't have one, you can [**create a free account**](https://azure.microsoft.com/free/).
3333

34-
* An [**Azure blob storage account**](https://portal.azure.com/#create/Microsoft.StorageAccount-ARM). You'll create containers to store and organize your blob data within your storage account.
34+
* An [**Azure blob storage account**](https://portal.azure.com/#create/Microsoft.StorageAccount-ARM). You create containers to store and organize your blob data within your storage account.
3535

3636
* A [**single-service Translator resource**](https://portal.azure.com/#create/Microsoft.CognitiveServicesTextTranslation) (**not** a multi-service Cognitive Services resource):
3737

@@ -84,16 +84,16 @@ Requests to the Translator service require a read-only key for authenticating ac
8484
1. If you've created a new resource, after it deploys, select **Go to resource**. If you have an existing Document Translation resource, navigate directly to your resource page.
8585
1. In the left rail, under *Resource Management*, select **Keys and Endpoint**.
8686
1. Copy and paste your key in a convenient location, such as *Microsoft Notepad*.
87-
1. You'll paste it into the code ample to authenticate your request to the Document Translation service.
87+
1. You paste it into the code sample to authenticate your request to the Document Translation service.
8888

8989
:::image type="content" source="../../media/translator-keys.png" alt-text="Image of the get your key field in Azure portal.":::
9090

9191
## Create Azure blob storage containers
9292

93-
You'll need to [**create containers**](../../../../storage/blobs/storage-quickstart-blobs-portal.md#create-a-container) in your [**Azure blob storage account**](https://portal.azure.com/#create/Microsoft.StorageAccount-ARM) for source and target files.
93+
You need to [**create containers**](../../../../storage/blobs/storage-quickstart-blobs-portal.md#create-a-container) in your [**Azure blob storage account**](https://portal.azure.com/#create/Microsoft.StorageAccount-ARM) for source and target files.
9494

9595
* **Source container**. This container is where you upload your files for translation (required).
96-
* **Target container**. This container is where your translated files will be stored (required).
96+
* **Target container**. This container is where your translated files are stored (required).
9797

9898
> [!NOTE]
9999
> Document Translation supports glossaries as blobs in target containers (not separate glossary containers). If want to include a custom glossary, add it to the target container and include the` glossaryUrl` with the request. If the translation language pair is not present in the glossary, it will not be applied. *See* [Translate documents using a custom glossary](#translate-documents-using-a-custom-glossary)
@@ -114,7 +114,7 @@ The `sourceUrl` , `targetUrl` , and optional `glossaryUrl` must include a Share
114114
115115
## HTTP requests
116116

117-
A batch Document Translation request is submitted to your Translator service endpoint via a POST request. If successful, the POST method returns a `202 Accepted` response code and the batch request is created by the service. The translated documents will be listed in your target container.
117+
A batch Document Translation request is submitted to your Translator service endpoint via a POST request. If successful, the POST method returns a `202 Accepted` response code and the service creates a batch request. The translated documents are listed in your target container.
118118

119119
### HTTP headers
120120

@@ -269,7 +269,7 @@ gradle init --type basic
269269

270270
* When prompted to choose a **DSL**, select **Kotlin**.
271271

272-
* Update the `build.gradle.kts` file. Keep in mind that you'll need to update your `mainClassName` depending on the sample:
272+
* Update the `build.gradle.kts` file. Keep in mind that you need to update your `mainClassName` depending on the sample:
273273

274274
```java
275275
plugins {
@@ -324,7 +324,7 @@ gradle run
324324
325325
#### Locating the `id` value
326326

327-
* You'll find the job `id` in the POST method response Header `Operation-Location` URL value. The last parameter of the URL is the operation's job **`id`**:
327+
* You find the job `id` in the POST method response Header `Operation-Location` URL value. The last parameter of the URL is the operation's job **`id`**:
328328

329329
|**Response header**|**Result URL**|
330330
|-----------------------|----------------|
@@ -1100,7 +1100,7 @@ func main() {
11001100

11011101
### Brief overview
11021102

1103-
Cancel currently processing or queued job. Only documents for which translation hasn't started will be canceled.
1103+
Cancel currently processing or queued job. Only documents for which translation hasn't started are canceled.
11041104

11051105
### [C#](#tab/csharp)
11061106

articles/cognitive-services/Translator/quickstart-translator.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ manager: nitinme
88
ms.service: cognitive-services
99
ms.subservice: translator-text
1010
ms.topic: quickstart
11-
ms.date: 02/01/2023
11+
ms.date: 03/17/2023
1212
ms.author: lajanuar
1313
ms.devlang: csharp, golang, java, javascript, python
1414
---
@@ -21,17 +21,17 @@ ms.devlang: csharp, golang, java, javascript, python
2121

2222
# Quickstart: Azure Cognitive Services Translator
2323

24-
Try the latest version of Azure Translator. In this quickstart, you'll get started using the Translator service to [translate text](reference/v3-0-translate.md) using a programming language of your choice or the REST API. For this project, we recommend using the free pricing tier (F0), while you're learning the technology, and later upgrading to a paid tier for production.
24+
Try the latest version of Azure Translator. In this quickstart, get started using the Translator service to [translate text](reference/v3-0-translate.md) using a programming language of your choice or the REST API. For this project, we recommend using the free pricing tier (F0), while you're learning the technology, and later upgrading to a paid tier for production.
2525

2626
## Prerequisites
2727

28-
To get started, you'll need an active Azure subscription. If you don't have an Azure subscription, you can [create one for free](https://azure.microsoft.com/free/cognitive-services/)
28+
You need an active Azure subscription. If you don't have an Azure subscription, you can [create one for free](https://azure.microsoft.com/free/cognitive-services/)
2929

3030
* Once you have your Azure subscription, create a [Translator resource](https://portal.azure.com/#create/Microsoft.CognitiveServicesTextTranslation) in the Azure portal.
3131

3232
* After your resource deploys, select **Go to resource** and retrieve your key and endpoint.
3333

34-
* You need the key and endpoint from the resource to connect your application to the Translator service. You'll paste your key and endpoint into the code later in the quickstart. You can find these values on the Azure portal **Keys and Endpoint** page:
34+
* You need the key and endpoint from the resource to connect your application to the Translator service. You paste your key and endpoint into the code later in the quickstart. You can find these values on the Azure portal **Keys and Endpoint** page:
3535

3636
:::image type="content" source="media/quickstarts/keys-and-endpoint-portal.png" alt-text="Screenshot: Azure portal keys and endpoint page.":::
3737

@@ -50,7 +50,7 @@ To get started, you'll need an active Azure subscription. If you don't have an A
5050

5151
## Headers
5252

53-
To call the Translator service via the [REST API](reference/rest-api-guide.md), you'll need to include the following headers with each request. Don't worry, we'll include the headers for you in the sample code for each programming language.
53+
To call the Translator service via the [REST API](reference/rest-api-guide.md), you need to include the following headers with each request. Don't worry, we include the headers for you in the sample code for each programming language.
5454

5555
For more information on Translator authentication options, _see_ the [Translator v3 reference](./reference/v3-0-reference.md#authentication) guide.
5656

@@ -67,7 +67,7 @@ Header|Value| Condition |
6767
6868
## Translate text
6969

70-
The core operation of the Translator service is translating text. In this quickstart, you'll build a request using a programming language of your choice that takes a single source (`from`) and provides two outputs (`to`). Then we'll review some parameters that can be used to adjust both the request and the response.
70+
The core operation of the Translator service is translating text. In this quickstart, you build a request using a programming language of your choice that takes a single source (`from`) and provides two outputs (`to`). Then we review some parameters that can be used to adjust both the request and the response.
7171

7272
### [C#: Visual Studio](#tab/csharp)
7373

@@ -381,7 +381,7 @@ After a successful call, you should see the following response:
381381
mkdir translator-text-app; cd translator-text-app
382382
```
383383

384-
1. Run the `gradle init` command from the translator-text-app directory. This command will create essential build files for Gradle, including _build.gradle.kts_, which is used at runtime to create and configure your application.
384+
1. Run the `gradle init` command from the translator-text-app directory. This command creates essential build files for Gradle, including _build.gradle.kts_, which is used at runtime to create and configure your application.
385385

386386
```console
387387
gradle init --type basic
@@ -422,7 +422,7 @@ After a successful call, you should see the following response:
422422
mkdir -p src/main/java
423423
```
424424

425-
You'll create the following directory structure:
425+
You create the following directory structure:
426426

427427
:::image type="content" source="media/quickstarts/java-directories-2.png" alt-text="Screenshot: Java directory structure.":::
428428

0 commit comments

Comments
 (0)