
Explanation:

In the Azure AI Translator .NET SDK ( Azure.AI.Translation.Text ), the TextTranslationClient exposes TranslateAsync overloads that accept a target language (e.g., " fr " ) and an input string to translate. The call returns a Response < IReadOnlyList < TranslatedTextItem > > . Each TranslatedTextItem includes the automatically detected source language ( DetectedLanguage.Language ) and a collection of translations in Translations . To print the translated text for the first target language, read translation.Translations[0].Text .
Therefore:
Use TranslateAsync(targetLanguage, input) to perform the translation.
Output translation.Translations[0].Text to display the translated result.
Microsoft References
TextTranslationClient.TranslateAsync method (overloads, usage). Microsoft Learn TextTranslationClient class overview. Microsoft Learn TranslatedTextItem model and Translations property (array of translation results).
Quickstart: Translator text client libraries (end-to-end usage pattern). Microsoft Learn