A localization engineer explains the XLIFF format to a developer. Which description of a trans-unit in XLIFF 1.2 is most accurate?
The trans-unit is the atom of XLIFF — it pairs a source string with its translation and carries metadata the translator needs.
Example XLIFF 1.2 snippet: <trans-unit id="btn.submit" resname="btn.submit"><source>Submit</source><target state="translated">Enviar</target></trans-unit>. Key attributes: id (unique within the file), resname (the string key in your app), translate="yes/no" (mark non-translatable segments). The state attribute on <target> tracks workflow: new → needs-translation → translated → final. CAT tools and TMS platforms use this state to drive the translation workflow.
Key vocabulary: • trans-unit — XLIFF element pairing source string with target translation; the basic unit of localization • resname — attribute on trans-unit identifying the string key in the source application • translate="no" — marks non-translatable segments (brand names, code snippets, placeholders)
2 / 30
A developer asks: "We use .po files for our Django app. What is the difference between msgid and msgstr?"
In gettext .po files, msgid = the source string (lookup key), msgstr = the translation. An empty msgstr means the string is not yet translated.
Example: msgid "Welcome back, %(name)s" / msgstr "Bienvenido de nuevo, %(name)s". The msgid is used verbatim in the application code: gettext("Welcome back, %(name)s"). At runtime, gettext looks up the msgid in the compiled .mo file and returns the msgstr for the active locale. If msgstr is empty (""), gettext returns the msgid — so the source language text is displayed, which is the correct fallback behaviour. The .pot file (template) contains only msgids with empty msgstrs; translators fill in the msgstrs.
Key vocabulary: • msgid — the source string in .po files; used as the lookup key at runtime • msgstr — the translated string; empty string means untranslated (falls back to msgid) • .pot file — .po template with all msgids and empty msgstrs; distributed to translators
3 / 30
A localization project manager mentions translation memory (TM) leverage. What does this term mean?
TM leverage is the business metric for how much existing translation can be reused — directly impacting cost and speed.
When a new batch of content arrives for translation, the TMS compares each segment against the TM. The report shows: 100% matches (exact) — typically charged at 0-25% of the full rate or free; fuzzy matches (85-99%) — translator reviews and edits; new content (below 85% or no match) — full translation cost. A release with 70% TM leverage means 70% of the content was already translated before — only 30% is new work. Engineering decisions that affect leverage: keeping existing string keys stable when wording changes slightly vs. creating new keys (new key = no TM match even if translation is the same).
Key vocabulary: • TM leverage — percentage of new content matching existing TM segments; reduces cost and time • 100% match — exact segment match in TM; typically free or very cheap to translate • fuzzy match — 85-99% similar; translator edits the existing translation; charged at reduced rate
4 / 30
A Flutter developer asks about the ARB format for localizing their app. What is ARB and what makes it different from other formats?
ARB's @key metadata entries are what distinguish it — they give translators context and format information alongside the source string.
Example ARB entry: {"welcomeMessage": "Welcome, {name}!", "@welcomeMessage": {"description": "Greeting shown on the home screen", "placeholders": {"name": {"type": "String", "example": "Maria"}}}}. The @welcomeMessage entry tells the translator: this string has a placeholder called {name} that will be a person's name. CAT tools and TMS platforms use these metadata entries to protect placeholders from accidental translation and provide context. Supported by Crowdin, Phrase, and Lokalise natively.
Key vocabulary: • ARB — Application Resource Bundle; JSON format for Flutter/Dart localization • @key metadata — description and placeholder info for translators; prevents placeholder corruption • ICU MessageFormat in ARB — plural and select patterns written directly in ARB string values
5 / 30
A developer says: "We need to mark these brand names and API endpoint strings as non-translatable in our XLIFF files." How is this done and why does it matter?
translate="no" is the XLIFF mechanism for protecting strings that must not be changed — brand names, URLs, code snippets, and technical identifiers.
Without this protection, translators may attempt to translate brand names (translating "Firebase" into a localized term) or modify API endpoint strings (changing /api/v1/users to /api/v1/utenti in Italian). These modifications break the application. The translate="no" attribute causes CAT tools to lock the segment and auto-populate the target with the source value. It is also useful for segments that are already in the target language (e.g., an English error code that should appear in English in all locales). XLIFF 2.0 uses the same attribute on <segment> elements.
Key vocabulary: • translate="no" — XLIFF attribute locking a segment against translation; CAT tool displays it as read-only • non-translatable segment — brand names, URLs, code, technical IDs that must appear unchanged in all locales • locked segment — CAT tool term for a segment the translator cannot modify; source is copied to target
6 / 30
Sarah (Localization Engineer): "Okay, let's talk about trans-units. In XLIFF 1.2, a trans-unit is essentially a container for a single piece of text that needs to be translated. It includes the source text itself, and metadata like the language code and flags indicating whether it's a variable or a static string. Think of it as the fundamental building block for our translation workflow." Which statement best reflects Sarah's explanation?
Sarah's explanation correctly identifies that the trans-unit holds both the original source text *and* the necessary language information. The incorrect options either misrepresent the purpose of metadata (only language code) or incorrectly state its primary function (solely storing translated text).
7 / 30
"Mark (Senior Developer) sends a Slack message: 'Just noticed we're using XLIFF for the Spanish localization. I'm getting these XML tags with attributes like and —can someone explain what they represent in the context of translating UI strings?'
Mark's message highlights the core function of these tags: they link the source text to its translated version. This is fundamental to how XLIFF represents translations within an XML structure, enabling translation tools to manage and automate the process. The other options misinterpret their role.
8 / 30
"David (Product Manager) writes in a PR description: 'Implementing TM integration requires accurately mapping existing XLIFF files to our translation memory system. We need to ensure that translated strings are correctly associated with their original source text—this is crucial for leveraging the benefits of translation memory.' What's the primary reason for this accurate mapping?
The core benefit of translation memory is reusing prior translations. Accurate mapping ensures that translated strings are correctly linked to their source counterparts, allowing the TM system to identify and suggest these existing translations for reuse – this dramatically speeds up localization and maintains consistency. The other options describe secondary benefits or related processes.
9 / 30
"Emily (QA Tester): 'I'm reviewing the XLIFF file for the German localization and noticed several instances where brand names and API endpoint URLs are enclosed in tags. Should we be marking these as non-translatable?'
Emily is correctly identifying a best practice. Brand names and URLs are typically treated as static content – they don't change with translation – so marking them as non-translatable prevents unnecessary processing by the translation engine, reducing potential errors and improving efficiency. The other options misrepresent the role of these elements or introduce unnecessary complexity.
10 / 30
"Ben (Developer): 'We're encountering issues with inconsistent date formatting in our localized versions. The XLIFF files contain various date formats—some use 'MM/DD/YYYY', others 'YYYY-MM-DD'. How do we ensure all date formats are consistently translated?'
The most robust solution is to establish a single, standardized date format within the XLIFF file itself. This provides clear instructions for translators and ensures consistent formatting across all localized versions of the application. While other options might address aspects of localization, they don't directly solve the core issue of inconsistent date formats.
11 / 30
Sarah (Localization Engineer): "Okay, let's talk about trans-units. In XLIFF 1.2, a trans-unit is essentially a container for a single piece of text that needs to be translated. It includes the source text itself, and metadata like the language code and flags indicating whether it's a variable or a static string. Think of it as the fundamental building block for our translation workflow." Which statement best reflects Sarah's explanation?
Sarah's explanation correctly identifies that the trans-unit holds both the original source text *and* the necessary language information. The incorrect options either misrepresent the purpose of metadata (only language code) or incorrectly state its primary function (solely storing translated text).
12 / 30
"Mark (Senior Developer) sends a Slack message: 'Just noticed we're using XLIFF for the Spanish localization. I'm getting these XML tags with attributes like and —can someone explain what they represent in the context of translating UI strings?'
Mark's message highlights the core function of these tags: they link the source text to its translated version. This is fundamental to how XLIFF represents translations within an XML structure, enabling translation tools to manage and automate the process. The other options misinterpret their role.
13 / 30
"David (Product Manager) writes in a PR description: 'Implementing TM integration requires accurately mapping existing XLIFF files to our translation memory system. We need to ensure that translated strings are correctly associated with their original source text—this is crucial for leveraging the benefits of translation memory.' What's the primary reason for this accurate mapping?
The core benefit of translation memory is reusing prior translations. Accurate mapping ensures that translated strings are correctly linked to their source counterparts, allowing the TM system to identify and suggest these existing translations for reuse – this dramatically speeds up localization and maintains consistency. The other options describe secondary benefits or related processes.
14 / 30
"Emily (QA Tester): 'I'm reviewing the XLIFF file for the German localization and noticed several instances where brand names and API endpoint URLs are enclosed in tags. Should we be marking these as non-translatable?'
Emily is correctly identifying a best practice. Brand names and URLs are typically treated as static content – they don't change with translation – so marking them as non-translatable prevents unnecessary processing by the translation engine, reducing potential errors and improving efficiency. The other options misrepresent the role of these elements or introduce unnecessary complexity.
15 / 30
"Ben (Developer): 'We're encountering issues with inconsistent date formatting in our localized versions. The XLIFF files contain various date formats—some use 'MM/DD/YYYY', others 'YYYY-MM-DD'. How do we ensure all date formats are consistently translated?'
The most robust solution is to establish a single, standardized date format within the XLIFF file itself. This provides clear instructions for translators and ensures consistent formatting across all localized versions of the application. While other options might address aspects of localization, they don't directly solve the core issue of inconsistent date formats.
16 / 30
Sarah (Localization Engineer): "Okay, let's talk about trans-units. In XLIFF 1.2, a trans-unit is essentially a container for a single piece of text that needs to be translated. It includes the source text itself, and metadata like the language code and flags indicating whether it's a variable or a static string. Think of it as the fundamental building block for our translation workflow." Which statement best reflects Sarah's explanation?
Sarah's explanation correctly identifies that the trans-unit holds both the original source text *and* the necessary language information. The incorrect options either misrepresent the purpose of metadata (only language code) or incorrectly state its primary function (solely storing translated text).
17 / 30
"Mark (Senior Developer) sends a Slack message: 'Just noticed we're using XLIFF for the Spanish localization. I'm getting these XML tags with attributes like and —can someone explain what they represent in the context of translating UI strings?'
Mark's message highlights the core function of these tags: they link the source text to its translated version. This is fundamental to how XLIFF represents translations within an XML structure, enabling translation tools to manage and automate the process. The other options misinterpret their role.
18 / 30
"David (Product Manager) writes in a PR description: 'Implementing TM integration requires accurately mapping existing XLIFF files to our translation memory system. We need to ensure that translated strings are correctly associated with their original source text—this is crucial for leveraging the benefits of translation memory.' What's the primary reason for this accurate mapping?
The core benefit of translation memory is reusing prior translations. Accurate mapping ensures that translated strings are correctly linked to their source counterparts, allowing the TM system to identify and suggest these existing translations for reuse – this dramatically speeds up localization and maintains consistency. The other options describe secondary benefits or related processes.
19 / 30
"Emily (QA Tester): 'I'm reviewing the XLIFF file for the German localization and noticed several instances where brand names and API endpoint URLs are enclosed in tags. Should we be marking these as non-translatable?'
Emily is correctly identifying a best practice. Brand names and URLs are typically treated as static content – they don't change with translation – so marking them as non-translatable prevents unnecessary processing by the translation engine, reducing potential errors and improving efficiency. The other options misrepresent the role of these elements or introduce unnecessary complexity.
20 / 30
"Ben (Developer): 'We're encountering issues with inconsistent date formatting in our localized versions. The XLIFF files contain various date formats—some use 'MM/DD/YYYY', others 'YYYY-MM-DD'. How do we ensure all date formats are consistently translated?'
The most robust solution is to establish a single, standardized date format within the XLIFF file itself. This provides clear instructions for translators and ensures consistent formatting across all localized versions of the application. While other options might address aspects of localization, they don't directly solve the core issue of inconsistent date formats.
21 / 30
Sarah (Localization Engineer): "Okay, let's talk about trans-units. In XLIFF 1.2, a trans-unit is essentially a container for a single piece of text that needs to be translated. It includes the source text itself, and metadata like the language code and flags indicating whether it's a variable or a static string. Think of it as the fundamental building block for our translation workflow." Which statement best reflects Sarah's explanation?
Sarah's explanation correctly identifies that the trans-unit holds both the original source text *and* the necessary language information. The incorrect options either misrepresent the purpose of metadata (only language code) or incorrectly state its primary function (solely storing translated text).
22 / 30
"Mark (Senior Developer) sends a Slack message: 'Just noticed we're using XLIFF for the Spanish localization. I'm getting these XML tags with attributes like and —can someone explain what they represent in the context of translating UI strings?'
Mark's message highlights the core function of these tags: they link the source text to its translated version. This is fundamental to how XLIFF represents translations within an XML structure, enabling translation tools to manage and automate the process. The other options misinterpret their role.
23 / 30
"David (Product Manager) writes in a PR description: 'Implementing TM integration requires accurately mapping existing XLIFF files to our translation memory system. We need to ensure that translated strings are correctly associated with their original source text—this is crucial for leveraging the benefits of translation memory.' What's the primary reason for this accurate mapping?
The core benefit of translation memory is reusing prior translations. Accurate mapping ensures that translated strings are correctly linked to their source counterparts, allowing the TM system to identify and suggest these existing translations for reuse – this dramatically speeds up localization and maintains consistency. The other options describe secondary benefits or related processes.
24 / 30
"Emily (QA Tester): 'I'm reviewing the XLIFF file for the German localization and noticed several instances where brand names and API endpoint URLs are enclosed in tags. Should we be marking these as non-translatable?'
Emily is correctly identifying a best practice. Brand names and URLs are typically treated as static content – they don't change with translation – so marking them as non-translatable prevents unnecessary processing by the translation engine, reducing potential errors and improving efficiency. The other options misrepresent the role of these elements or introduce unnecessary complexity.
25 / 30
"Ben (Developer): 'We're encountering issues with inconsistent date formatting in our localized versions. The XLIFF files contain various date formats—some use 'MM/DD/YYYY', others 'YYYY-MM-DD'. How do we ensure all date formats are consistently translated?'
The most robust solution is to establish a single, standardized date format within the XLIFF file itself. This provides clear instructions for translators and ensures consistent formatting across all localized versions of the application. While other options might address aspects of localization, they don't directly solve the core issue of inconsistent date formats.
26 / 30
Sarah (Localization Engineer): "Okay, let's talk about trans-units. In XLIFF 1.2, a trans-unit is essentially a container for a single piece of text that needs to be translated. It includes the source text itself, and metadata like the language code and flags indicating whether it's a variable or a static string. Think of it as the fundamental building block for our translation workflow." Which statement best reflects Sarah's explanation?
Sarah's explanation correctly identifies that the trans-unit holds both the original source text *and* the necessary language information. The incorrect options either misrepresent the purpose of metadata (only language code) or incorrectly state its primary function (solely storing translated text).
27 / 30
"Mark (Senior Developer) sends a Slack message: 'Just noticed we're using XLIFF for the Spanish localization. I'm getting these XML tags with attributes like and —can someone explain what they represent in the context of translating UI strings?'
Mark's message highlights the core function of these tags: they link the source text to its translated version. This is fundamental to how XLIFF represents translations within an XML structure, enabling translation tools to manage and automate the process. The other options misinterpret their role.
28 / 30
"David (Product Manager) writes in a PR description: 'Implementing TM integration requires accurately mapping existing XLIFF files to our translation memory system. We need to ensure that translated strings are correctly associated with their original source text—this is crucial for leveraging the benefits of translation memory.' What's the primary reason for this accurate mapping?
The core benefit of translation memory is reusing prior translations. Accurate mapping ensures that translated strings are correctly linked to their source counterparts, allowing the TM system to identify and suggest these existing translations for reuse – this dramatically speeds up localization and maintains consistency. The other options describe secondary benefits or related processes.
29 / 30
"Emily (QA Tester): 'I'm reviewing the XLIFF file for the German localization and noticed several instances where brand names and API endpoint URLs are enclosed in tags. Should we be marking these as non-translatable?'
Emily is correctly identifying a best practice. Brand names and URLs are typically treated as static content – they don't change with translation – so marking them as non-translatable prevents unnecessary processing by the translation engine, reducing potential errors and improving efficiency. The other options misrepresent the role of these elements or introduce unnecessary complexity.
30 / 30
"Ben (Developer): 'We're encountering issues with inconsistent date formatting in our localized versions. The XLIFF files contain various date formats—some use 'MM/DD/YYYY', others 'YYYY-MM-DD'. How do we ensure all date formats are consistently translated?'
The most robust solution is to establish a single, standardized date format within the XLIFF file itself. This provides clear instructions for translators and ensures consistent formatting across all localized versions of the application. While other options might address aspects of localization, they don't directly solve the core issue of inconsistent date formats.
What will I practise in "XLIFF and Translation File Formats — Vocabulary — Localization Engineering | CoderLingo"?
5 exercises practising XLIFF structure, .po file syntax, CAT tool vocabulary, and translation segment terminology for localization engineers.
How many exercises are in this module?
This module has 30 multiple-choice exercises, each with instant feedback and a full explanation of the correct answer.
Is this exercise free to use?
Yes. Every exercise on CoderSlingo, including this one, is free to use with no account, sign-up, or paywall.
Do I need to create an account to do these exercises?
No account is required. Just click an option to answer — your score for this session is tracked automatically in the progress bar above.
What happens if I choose the wrong answer?
You'll immediately see which answer was correct, plus a full explanation covering the vocabulary and reasoning behind it — mistakes are where most of the learning happens.
Can I retry the exercises if I want a higher score?
Yes — use the "Try again" button on the results screen to reset and go through all the questions again.
Is my progress saved if I close the page?
No. Progress is tracked only for your current visit; reloading or leaving the page resets the counter. This keeps the exercise simple and account-free.
Where can I find more Localization Engineering Language exercises?
Browse the full Localization Engineering Language hub for related drills, or check the "Next up" link below to continue with a connected topic.
How is this different from reading an article on the same topic?
Articles explain vocabulary and concepts in prose; this exercise tests and reinforces that vocabulary through active recall with immediate feedback — the two work best together.
Who writes these exercises?
Every exercise is written by the CoderSlingo team, drawing on real workplace English used in IT roles, then reviewed for accuracy and clarity.