Your profile

One profile for every MSDEVBUILD site. Only you can see it, and the site owner if you write in.

Lesson 32 of 39
❮Prev Next❯

Translate Text with Translator or a Language Model

Module 4: Text & Speech ⏱ 9 min read Updated

Your note

My notes for this lesson

Select any text in the lesson to highlight it or add a note. Saved in this browser.

    No highlights yet. Select a sentence in the lesson, then pick a colour or add a note.

    All my bookmarks and notes

    Reading settings

    For every lesson, saved in this browser.

    Text size
    Line spacing
    Font

    With IaaS you rent the virtual machine. Microsoft looks after the building, power and hardware; you patch the operating system.

    30-second answer

    Use Azure Translator in Foundry Tools when you want fast, consistent, per-character translation: it detects the source language, returns several target languages in one call, and keeps terms right with a dynamic dictionary (no training) or Custom Translator (trained on your sentence pairs). A multi-service resource needs the region sent with the key. Use an LLM translation flow when tone, context or formatting rules matter: you write them in plain words in the instructions. It costs more, can vary run to run, and should be tested with an evaluation set before release.

    Simulate it » No Azure account needed

    Exam objective: 4.1.3 Translate text by using Azure Translator in Foundry Tools or LLM-powered translation flows. (Skills measured as of April 16, 2026)

    Simulations

    Feel it before you read it. No account needed, nothing leaves this page.

    Azure portal: Translate with Azure Translator, protect terms, then try an LLM flow Translate with Azure Translator, protect a term, then try an LLM flow.
    </> Embed

    Embed this simulation

    Free for trainers, teachers and bloggers. Paste this into your page:

    Loading the portal…

    Open <strong>Foundry Tools</strong> and pick <strong>Azure Translator</strong>. Your Foundry resource can call it with its own key and endpoint.

    👆 Click the glowing item in the portal to continue

    Read the steps as text
    1. Open Foundry Tools and pick Azure Translator. Your Foundry resource can call it with its own key and endpoint.
    2. Choose Auto-detect as the source and three targets. Translator returns all three in one call.
    3. Good translations, wrong brand name. That's the classic reason for a glossary.
    4. In Keys and endpoints note the region: a multi-service resource needs it on every Translator call. The dynamic dictionary tag pins the brand name.
    5. For an LLM translation flow, put the target language, tone, glossary and formatting rules in the instructions of a model deployment.
    6. Pick Translator for volume, speed and steady output. Pick an LLM flow when tone, context or reformatting matter, and test it with an evaluation set.

    🧪 Simulation for learning. Screens are simplified versions of the Azure portal; names, prices and IDs are examples. Nothing here touches real Azure.

    😟 THE PROBLEM

    Refund messages must reach customers in three languages, and the brand name keeps getting translated.

    😊 THE SOLUTION

    Use Azure Translator for volume, protect terms with a dynamic dictionary, and use an LLM flow when tone matters.

    • Many languages in one call✓ Translator with several target languages
    • Brand name translated like a normal word✓ Dynamic dictionary or Custom Translator
    • Needs a formal, polite tone✓ A model with tone instructions
    🛠️ Solved with: Azure Translator and LLM translation

    Start with a question

    Should your refund email say 'Contoso Pay' or 'Contoso Payer' in French?

    Contoso Pay sends refund messages to customers in Chennai, Delhi and Lyon. A translation service turns the English into Tamil, Hindi and French in under a second. The text reads well. But the product name came out translated like ordinary words, and in French it’s now “Contoso Payer”.

    That’s the whole lesson in one example. Translation is easy to get fast. Getting the terms and the tone right is the work.

    Explain it like I’m 10

    The technical explanation

    Azure Translator

    Azure Translator in Foundry Tools translates text and documents. Key behaviors:

    • Language detection: leave from out and the response includes the detected language and a score.
    • Several targets per call: pass a list of target languages and get one result per language.
    • Billing per character, and very low latency.
    • Same input, same output, which helps testing.
    from azure.core.credentials import AzureKeyCredential
    from azure.ai.translation.text import TextTranslationClient
    
    client = TextTranslationClient(credential=AzureKeyCredential(KEY), region="eastus")
    result = client.translate(body=[message], to_language=["ta", "hi", "fr"])
    for t in result[0].translations:
        print(t.to, t.text)

    A multi-service Foundry resource needs the region sent with the key (the Ocp-Apim-Subscription-Region header, or region= in the SDK). A single-service Translator resource doesn’t.

    Protect your terms

    NeedUseTraining
    Keep one or two names unchanged, or fix a few translationsDynamic dictionary in the requestNone
    A whole domain’s vocabulary and style, medical or legalCustom TranslatorSentence pairs in your language pair

    The dynamic dictionary is markup inside the text:

    Your <mstrans:dictionary translation="Contoso Pay">Contoso Pay</mstrans:dictionary> refund will arrive in 2 working days.

    LLM translation flows

    Put the rules in the instructions of a model deployment:

    Translate the user's text into Hindi. Tone: formal.
    Keep "Contoso Pay" in English. Keep numbers as digits. Return only the translation.

    Set temperature to 0 for steadier output. The model follows tone and formatting rules that Translator can’t, and it can use context you pass in. The price is cost per token, slower replies and some variation, so build an evaluation set of real messages and check accuracy, tone and terms before release.

    Azure TranslatorLLM flow
    CostPer character, lowPer token, higher
    SpeedVery fastSlower
    ConsistencySame every timeCan vary
    Tone and formatLimitedFollows instructions
    Your termsDictionary, Custom TranslatorGlossary in the prompt
    Architect level Custom Translator or a dynamic dictionary?

    A dynamic dictionary is a per-request override. It’s perfect for a handful of names, but you must send it with every call. Custom Translator trains a model on parallel sentences, so it learns context and style across thousands of terms. Pick the dictionary for the quick fix, and Custom Translator when your content has its own language, like medical device manuals.

    Real-world business scenario

    Payments

    Contoso Pay (fictional)

    The problem
    Refund and dispute messages in English had to go out in Tamil, Hindi and French. The brand name was translated, and compliance wanted a formal tone for dispute letters.
    What they used
    Azure Translator with a dynamic dictionary for routine refund messages, and a model deployment with a formal-tone instruction for dispute letters, tested on 200 reviewed samples.
    Why that choice
    Translator handled the volume cheaply and steadily. The model was used only where tone changed the outcome, and it was checked before release.
    The result
    Routine messages went out in seconds in three languages with the brand intact, and the dispute letters passed review by native-speaking staff.

    When to use it and when not to

    ✓ Use it when…

    • You translate large volumes and need the same output for the same input (Translator).
    • A brand or product name must stay as written (dynamic dictionary).
    • The text needs a set tone or format, and you can test it (LLM flow).

    ✕ Think twice when…

    • You call Translator once for each target language.
    • You ship an LLM translation flow without an evaluation set.
    • You train Custom Translator to protect two product names.

    ↔ Alternatives to consider

    • Custom Translator for a large domain vocabulary.
    • Document translation for whole files that must keep their layout.
    • Speech translation when the input is audio.
    Ready for more?The full lesson adds the technical explanation, when to use it, interview questions and revision notes.

    Test yourself with exercises

    5 original practice questions in the AI-103 style. Pick your answers, then check them. You will see why each option is right or wrong. Score 75% or more and this topic is marked complete.

    Question 1

    Question 1 of 5

    An app translates refund notices into Tamil, Hindi and French. It must make as few calls as possible and keep the cost per character low. What should you do?

    Question 2

    Question 2 of 5

    Translations are accurate, but the product name Contoso Pay is translated as ordinary words in every language. You must fix this without training a model. What should you use?

    Question 3

    Question 3 of 5

    A bank must translate letters into formal Hindi, keep numbers as digits and keep the product name in English. Rules change often and are written in plain language by the compliance team. Which approach fits best?

    Question 4

    Question 4 of 5

    Your Foundry resource is a multi-service resource. Calls to Azure Translator with the resource key return an authentication error about the region. What is the most likely fix?

    Question 5

    Question 5 of 5 · Select 2

    You compare Azure Translator with an LLM translation flow for 2 million customer messages. Which two statements are true? Each correct answer presents part of the solution.

    Interview preparation

    Say your answer out loud first, then open the model answer. Interviewers care more about your reasoning than the exact words.

    Beginner How do you translate one message into three languages?

    Model answer

    One call to Azure Translator with three target languages. I leave the source out so it detects it, and I get all three translations back together.

    Intermediate Translator keeps translating our product name. What do you do?

    Model answer

    I add a dynamic dictionary entry in the request for that name, so it stays as written. If the whole domain has terms like that, I'd train a Custom Translator model on our own sentence pairs instead.

    Experienced developer How do you choose between Translator and a model for translation?

    Model answer

    I compare cost, consistency and tone. Translator is quick, cheap per character and gives the same output each time. A model follows tone and format rules but costs more and can vary, so I'd run an evaluation on real messages and check term accuracy and tone before I'd trust it.

    Scenario A bank wants formal Hindi letters that keep numbers as digits. What's your design?

    Model answer

    A model deployment with instructions for formal tone, digits and the product name in English, temperature 0, and an evaluation set of real letters checked by a native reviewer. I'd keep Translator as the cheap path for messages where tone doesn't matter.

    Quick revision

    Key points

    • Translator returns many target languages from one request and can detect the source.
    • Dynamic dictionary needs no training. Custom Translator needs sentence pairs.
    • A multi-service resource needs the region header with the key.
    • LLM flows follow tone rules written in plain language but cost more and can vary.
    • Evaluate an LLM flow before you ship it.

    Important terminology

    Azure Translator
    The Foundry Tool for text and document translation, with language detection and support for many languages in one request.
    Dynamic dictionary
    Markup in a Translator request that fixes how a term is translated, or keeps it unchanged. No training needed.
    Custom Translator
    A feature where you train a translation model on your own sentence pairs so domain terms and style come out right.
    LLM translation flow
    Translation done by a model deployment, with tone, glossary and formatting rules written in the instructions.
    Region header
    The Ocp-Apim-Subscription-Region header, required when a multi-service resource key calls Translator.

    Common mistakes

    • Calling Translator once per target language.
    • Training Custom Translator when a dynamic dictionary would do.
    • Forgetting the region on a multi-service resource.

    Exam tips

    • "Brand name must stay unchanged, no training" = dynamic dictionary.
    • "Formal tone, rules in plain words" = LLM translation flow.
    • "Millions of messages, lowest cost, same output" = Translator.

    Five quick revision questions

    1. 1.How many target languages can one Translator call return?Show

      Several.

    2. 2.What do you add to keep a brand name unchanged without training?Show

      A dynamic dictionary entry.

    3. 3.Which header carries the region for a multi-service resource?Show

      Ocp-Apim-Subscription-Region.

    4. 4.What should you do before shipping an LLM translation flow?Show

      Evaluate it on a test set.

    5. 5.Which feature trains on your own sentence pairs?Show

      Custom Translator.

    Official references

    Finished this lesson? Tick it off. Your progress is saved in this browser.

    Next up: Speech to Text and Text to Speech for Agents

    Studying with a friend? Send them this lesson

    It's free and needs no sign-up. Their progress saves in their own browser.

    Lesson done? Make it stick with a quick gameSort It, Match the Pairs, Lightning Round and Who Am I? Earn XP and badges. Play ❯

    Install MSDEVBUILD Azure

    Free · no account · works offline

    Save the whole course for offline ›

    Hi, I’m your Nimbus

    Your study buddy. Pick what we do next.

    MSDEVBUILD · Multi-Stack Dev Build

    Sign in to MSDEVBUILD

    One account for Azure certifications and the blog: sign in here and you are signed in on both. Your XP, streak, practice deck and certificate stay in sync on every device. Optional: everything works without an account.