---
title: prepareTranslation()
framework: translation
role: symbol
role_heading: Instance Method
path: translation/translationsession/preparetranslation()
---

# prepareTranslation()

Asks for permission to download translation languages without doing any translations.

## Declaration

```swift
func prepareTranslation() async throws
```

## Discussion

Discussion If you know ahead of time which languages the person needs to translate, you can prompt them to download those languages in advance by calling this method. When you call this method, the framework asks the person for permission to download the sourceLanguage and targetLanguage. If the languages are already installed or in the middle of downloading, the function returns without prompting them. If you call this function when the sourceLanguage is nil, it throws unableToIdentifyLanguage error, since there’s no sample text to identify which source language to use for translation.

## See Also

### Preparing for translation

- [TranslationSession.Configuration](translation/translationsession/configuration.md)
