Skip to main content

How to Import Multilingual XML Files

wxrks can extract source and target text directly from a single XML file that already holds multiple languages, such as TMX-style translation units. Instead of splitting the file beforehand, you define XPath rules that tell wxrks exactly which XML elements hold the source text and which hold each target language — and the cleanest place to set this up is while you're creating the project itself, right after you've chosen its target languages.

Prerequisites & Permissions

  • Role & Permission: Requires Account Admin or Project Manager permissions to create projects, add files, and configure import settings.

  • File Type: Applies only to files with the .xml extension.

  • Dependencies: None — this feature is available from the moment you start a new project, before any project exists yet.

Key Concepts

Term

Description

XPath

A query syntax that points to elements inside an XML document by their structure (e.g., //tu selects every <tu> element anywhere in the file). wxrks uses XPath to locate elements, not to match visible text.

Record Node XPath

The XPath that selects each translation unit — the parent element that contains one source node and one or more target nodes (e.g., //tu or //*[local-name()='trans-unit']).

Source Text XPath

The XPath, evaluated relative to each record node, that points to the source-language element (e.g., tuv[@lang='en']/seg).

Target Text XPath by Locale

One row per target language. Each row's Target Locale is wxrks's own locale code (e.g., pt_br) and is filled in automatically from the project's target languages. You only fill in the Target XPath — relative to the record node — pointing to that language's element in the file (e.g., tuv[@lang='pt-BR']/seg).

NOTE: **Multilingual XML** is a different setting from **Bilingual XML**, a separate toggle in the same file's **Options** panel (under **Flags**). Use Bilingual XML when a file pairs one source sibling tag with exactly one target sibling tag per record (e.g., `<text_data lang="en">` followed by `<text_data lang="dk">`) — one target language per file. Use Multilingual XML when a single record holds several target-language nodes and one file needs to cover every target language at once.

Step-by-Step Instructions

Step 1: Start a New Project

  1. Log in to wxrks.

  2. In the sidebar, expand Projects and click New Project.

  3. Click Create a Direct Project.

Projects sidebar expanded with the New Project link highlighted

Step 2: Set the Project's Source and Target Languages

  1. In the Configuration step, fill in the required fields: Organizational Unit (the client or team the project is filed under), Contact Person, and Project Reference.

  2. Set the Source Language.

  3. Set Target Languages, adding every language your XML file needs to deliver.

  4. Click Next.

TIP: Add every target language you need here before uploading the file. Once the project has target languages set, wxrks automatically creates one **Target Text XPath by Locale** row per language when you enable Multilingual XML in the next step — you only need to fill in the XPath for each, not add the languages manually.

Configuration step with Source Language and Target Languages fields filled in

Step 3: Upload the XML File

  1. In the Upload Files step, upload your .xml file.

  2. The file appears in the list, and Next becomes available once it finishes uploading.

Upload Files step with the XML file uploaded and the wizard's three-step progress bar visible

Step 4: Enable Multilingual XML

  1. Click the uploaded file's row to expand its Options panel.

  2. Under the Multilingual XML section, turn on the Multilingual XML toggle.

Multilingual XML section with the toggle switched off, ready to be enabled

Step 5: Configure the XPath Rules

With Multilingual XML enabled, three fields appear:

  1. Record Node XPath (required): Enter the XPath for the element that wraps each translation unit, for example //tu.

  2. Source Text XPath (required): Enter the XPath, relative to the record node, for the source-language text, for example tuv[@lang='en']/seg.

  3. Target Text XPath by Locale: Since you already set the project's target languages in Step 2, one row per language is created automatically with its Target Locale pre-filled and locked (e.g., dede, ptbr). For each row, enter only the Target XPath, relative to the record node, matching the language attribute actually used in your file (e.g., tuv[@lang='de-DE']/seg for the de_de row).

Record Node XPath, Source Text XPath, and four Target Text XPath by Locale rows filled in with sample values

NOTE: The **Target Locale** field is only editable — with an **Add Locale Mapping** button to create rows manually — when the project has no target languages set yet. Since Step 2 already defines them, the rows are pre-built and locked here; to change which locales appear, go back and update the project's **Target Languages** instead of editing this list directly.

TIP: Any inline element found inside your selected source or target paths (such as bold or placeholder tags) is treated as translatable inline content by default, so you don't need to map those separately.

WARNING: Any XML element not reached by the Record Node, Source Text, or Target Text XPath rules is left untouched. wxrks freezes it so it can't be modified during translation — this keeps the surrounding file structure intact but means content outside your mapped nodes will never be translated.

NOTE: Already have a project and just need to add a multilingual XML file to it? The same **Multilingual XML** toggle and XPath fields are available from the project's **Files** tab: click **Upload Files**, add your `.xml` file, then expand its **Options** panel and follow Step 4 and Step 5 above.

Troubleshooting & Common Errors

Issue

Cause

Solution

A delivered file is missing translations for one language

No Target XPath was entered for that locale's row

Fill in the XPath for every target-language row before translation starts, or add that language to the project's Target Languages first if the row doesn't exist yet.

The file fails to process after upload

The Record Node XPath or Source Text XPath doesn't match any element in the file, or the XPath syntax is invalid

Re-check the XPath expressions against the file's actual structure (an XML/XPath validator can help), fix typos, then re-upload the file.

The Target Locale field can't be edited

The project already has target languages set, so each row is locked to keep the mapping in sync

Only the XPath is editable in this state. Change target locales from the project's Target Languages field instead.

Toggled the wrong flag and nothing happens

Bilingual XML and Multilingual XML sit close together in the file's options and are easy to mix up

Confirm Multilingual XML — not Bilingual XML — is the toggle that's on. Bilingual XML only supports one target language per file.

Quick Reference

Parameter / Limit

Specification

Supported Format

.xml

Required Fields

Record Node XPath, Source Text XPath, at least one Target Text XPath by Locale row

Default State

Disabled

Target Text XPath by Locale Rows

Auto-created and locked per project Target Language; manual Add Locale Mapping only available when no target languages are set yet

Unmapped XML Nodes

Frozen automatically (excluded from translation and left unmodified)

Did this answer your question?