AI-102 Practice Question: Implement natural language processing solutions
A developer is building a multilingual translation solution using Azure AI Translator. The solution must translate text to French, German, and Spanish. Which parameter should the developer set to specify the target language?
⚠ Common exam trap
A common mix-up: candidates confuse the parameter names with those from other Azure services (like 'targetLanguage' in Cognitive Services Text Analytics) or assume a generic 'language' parameter works, but Azure AI Translator specifically requires 'to' for the target language.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
to
In Azure AI Translator, the target language for translation is specified using the 'to' query parameter in the API request. This parameter accepts language codes such as 'fr' for French, 'de' for German, and 'es' for Spanish. The 'to' parameter is required and can be specified multiple times to translate into multiple target languages simultaneously.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
language
Why it's wrong here
The language parameter is not the Azure AI Translator target-language control; the to parameter specifies target languages, accepting multiple values for French, German and Spanish. It is tempting because it sounds like the language selector, but it does not exist for this purpose in the translation request.
- ✓
to
Why this is correct
The `to` parameter specifies the target language in Azure AI Translator requests, accepting one or more language codes such as fr, de, and es. This directly satisfies the stem's requirement to translate into French, German, and Spanish, since `to` defines output languages while `from` only declares the source.
- ✗
targetLanguage
Why it's wrong here
The parameter is toLanguage, not targetLanguage; targetLanguage does not exist in the Azure AI Translator API, so the request would fail validation. It is tempting because the name reads naturally and mirrors other Azure SDKs that do use targetLanguage-style naming for output locale selection.
- ✗
from
Why it's wrong here
The from parameter specifies the source language of the input text, not the target. It is tempting because it names a language, but translation output language is controlled by the to parameter, which accepts French, German and Spanish codes for the required targets.
Go deeper
Related to this question
About these practice questions
Courseiva writes every AI-102 question from scratch — 761 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This AI-102 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AI-102 exam.