# Azure Translator

{% hint style="info" %}
The following documentation is for **Azure Translator v1.3.4** *(BDK)*.
{% endhint %}

## Overview

Azure Translator provides AI-powered language translation services for global communication and localization. This integration enables automated text translation, language detection, and multilingual content workflows. Break down language barriers and automate international communication processes.

## Prerequisites

### 1. Required Books

The following Book(s) need to be added to your agent so it can learn and understand the automation procedures defined within them:

* **Azure Translator**

#### How to Add the Book(s)

1. Go to **Books** → **All Books**.
2. Search for the name of the book and click on it.
3. Click on <kbd>**Install**</kbd> or <kbd>**Add Connection**</kbd> to add the book to your agent.
4. If adding a connection, you'll be prompted for [**connectivity**](#connectivity) details.

## Connectivity

This section outlines the available methods for connecting to the Book, along with the required configuration details for each.

### Connect using Azure translator instance ID and Azure translator instance key

Connect to an API using the provided API key.

| Label                         | Description                       | Type   |
| ----------------------------- | --------------------------------- | ------ |
| Azure translator instance ID  | The Azure translator instance ID  | `text` |
| Azure translator instance key | The Azure translator instance key | `text` |

## Procedures

### to translate a document to a language

Translate a document to a language

**Input Concepts**

| Concept                                    | Description                                        | Type                     | Required | Default Value |
| ------------------------------------------ | -------------------------------------------------- | ------------------------ | -------- | ------------- |
| [`document`](#azure-file-reference)        | The document to be translated                      | `azure file reference`   | Yes      | (no default)  |
| `language`                                 | The language to translate the document to          | `text`                   | Yes      | (no default)  |
| [`target folder`](#azure-folder-reference) | The target folder to store the translated document | `azure folder reference` | Yes      | (no default)  |

**Output Concepts**

| Concept                           | Description             | Type                   |
| --------------------------------- | ----------------------- | ---------------------- |
| [`answer`](#azure-file-reference) | the translated document | `azure file reference` |

**Examples**

Translate a document to a language

```generic
get a folder at "container_name/docs"
get the folder's item whose path prefix is "document.txt"
get a folder at "container_name/translated_docs"
use the above as the second folder
translate the document to "spanish" with
    the target folder is the second folder
```

## Concepts

### Azure file reference

Represents a reference to a file in an Azure Storage.

| Field Name       | Description                                                                            | Type             |
| ---------------- | -------------------------------------------------------------------------------------- | ---------------- |
| `container_name` | The name of the container.                                                             | `text`           |
| `blob_name`      | The full path of the file within the container, including the file name and extension. | `text`           |
| `account_name`   | The name of the account.                                                               | `optional[text]` |
| `etag`           | Entity tag.                                                                            | `optional[text]` |
| `sas_token`      | SAS token.                                                                             | `optional[text]` |

### Azure folder reference

Represents a reference to a folder in an Azure Storage

| Field Name       | Description                                                                                                    | Type             |
| ---------------- | -------------------------------------------------------------------------------------------------------------- | ---------------- |
| `container_name` | The name of the container.                                                                                     | `text`           |
| `path`           | The path of the folder within the container. Should end with a trailing slash ('/') to indicate it's a folder. | `text`           |
| `account_name`   | The name of the account.                                                                                       | `optional[text]` |
| `etag`           | Entity tag                                                                                                     | `optional[text]` |
| `sas_token`      | SAS token.                                                                                                     | `optional[text]` |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.kognitos.com/legacy/legacy-experience/books/reference/azuretranslator.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
