
## translate(source_document, target_language) {#document_language}

Translates the provided document into the specified target language.
This operation leverages the connected AI model for content translating.


```python
def translate(self, source_document: aspose.words.Document, target_language: aspose.words.ai.Language):
    ...
```

| Parameter | Type | Description |
| --- | --- | --- |
| source_document | [Document](../../../aspose.words/document/) | The document to be translated. |
| target_language | [Language](../../language/) | The language into which the document will be translated. |

### Returns

A new [Document](../../../aspose.words/document/) object containing the translated document.


### See Also

* module [aspose.words.ai](../../)
* class [OpenAiModel](../)

