# Translate a Flow  
  
  
  
**Cognigy Support**  
February 12, 2021  
  
If one likes to speed up the process of translating all nodes in a Flow for different [locales](https://docs.cognigy.com/docs/localization), the `translate` command could be used.  
  
- [Documentation](https://github.com/Cognigy/Cognigy-CLI#command-translate)  
  
# How it works  
  
For this tutorial, the **Main** flow of the agent will be translated from _English_ into _German_. Therefore, one needs to navigate to the virtual agent's folder in the command line -- the directory where the _config.json_ file is located. The structure should look similar to this:  
  
```
.
├── agent
│   ├── flows
│   ├── Main
│   │   ├── config.json
│   │   └── en-US
│   │       ├── chart.json
│   │       └── intents.json
│   │   └── de-DE
│   │   ├── chart.json
│   │   └── intents.json
│   └── locales.json
```
  
In this example, the agent already contains the necessary locales:  
  
- en-US  
- de-DE  
  
Now the following command needs to be executed in order to translate the entire Flow into German:  
  
```
cognigy translate flow 'Main' -tr 'deepl' -k '<deepl-api-key>' -l 'de-DE' -tl 'de' -tn
```
  
This will use the [DeepL translator](https://www.deepl.com/translator) with a related API Key for adding localization to all nodes in the German version of the Flow, copying the English text and, finally, translate it.  
  
* _One can choose between Microsoft, Google or Deepl Translate._  
  
### Cognigy CLI  
  
- [Cognigy CLI Overview](https://support.cognigy.com/hc/en-us/articles/360016865839-Cognigy-CLI-Overview)  
- [Clone a Virtual Agent](https://support.cognigy.com/hc/en-us/articles/360016836580-Clone-a-Virtual-Agent)  
- [Pull Agent Resources](https://support.cognigy.com/hc/en-us/articles/360016843220-Pull-Agent-Resources)  
- [Translate a Flow](https://support.cognigy.com/hc/en-us/articles/360019580320-Translate-a-Flow)  
  
#### Table of contents  
  
How it works  
  
- [How it works](https://support.cognigy.com/hc/en-us/articles/360019580320-Translate-a-Flow#how-it-works-0-0)
