functions/translate library

Functions

translate(List<String> text, {required String key, required String region, String? baseLanguage, required List<String> languages}) Future<Result<List<TranslationResult>, AzureTranslationError>>
Translates a list of text to one or more languages. key and region must be provided. baseLanguage is an optional base language code, e.g. 'en' or 'fr'. If omitted, it will be detected and each result will include a DetectedLanguage.