# Translate

> `UiPath.MicrosoftTranslator.Activities.TranslateActivity`

`UiPath.MicrosoftTranslator.Activities.TranslateActivity`

The **Translate** activity uses the Microsoft Translator [API](https://docs.microsoft.com/en-us/azure/cognitive-services/translator/reference/v3-0-translate) to translate the provided text into the required language.

## How It Works

The following steps are an example of how the activity works from design time (i.e., the activity dependencies and input/output properties) to run time.

1. Complete the [Setup](https://docs.uipath.com/marketplace/automation-cloud/latest/user-guide/microsoft-translator-setup) steps.
2. Add the [Microsoft Translator Scope](https://docs.uipath.com/marketplace/automation-cloud/latest/user-guide/microsoft-translator-scope) activity to your project.
3. Add the **Translate** activity inside the **Microsoft Translator Scope** activity.
4. Create and enter a `Strings` or a `String` variables for the [Intput](https://docs.uipath.com/marketplace/automation-cloud/latest/user-guide/microsoft-translator-translate) properties.
5. Create and enter a `String` variable for the [Output](https://docs.uipath.com/marketplace/automation-cloud/latest/user-guide/microsoft-translator-translate) property.

## Properties

### Common
* **DisplayName** - The display name of the activity. This field supports only `Strings` or `String` variables.

### Input
* **From** - The language of the input text. This field supports only `Strings` or `String` variables. If not provided, the From language will be auto-detected. Languages need to be provided as BCP 47 language tags.
* **Text** - The text to be translated. This field supports only `Strings` or `String` variables. For a complete list of the supported languages, please visit the official Microsoft Documentation.
* **To** - The language of the output text. This field supports only `Strings` or `String` variables. If not provided, the From language will be auto-detected. Languages need to be provided as BCP 47 language tags.

### Misc
* **Private** - If selected, the values of variables and arguments are no longer logged at Verbose level.

### Options
* **Profanity Action** - Specifies how profanities should be treated in translations. Select one of the three options available: **NoAction**, **Deleted**, **Market**.
  + **Deleted** removes the sections from the text.
  + **Market** replaces the sections with a * character.
* **Profanity Marker** - Specifies how profanities should be treated in translations. Select one of the two options available: Asterisk, Tag.

### Output
* **Translation** - The result of the translation. This field supports only `String` variables.
