Many apps keep their UI strings in an XML file where each string comes with more than its text: a maximum length, a note for translators, and a screenshot of where it appears. With Record fields, wxrks reads those extra fields of each string and puts them next to its segment in the Editor: the limit is counted and enforced, the note shows as context (and can feed AI translation), and the screenshots show as images or as links.
💡 Who is this for? Account Admins who save XML filters for the account or an Organizational Unit (a group of clients or departments with its own settings), Project Managers who set the import settings of one XML file when creating a project, and Vendors who translate those files in the Editor.
Contents
How Record fields work
Take a string file like this one:
<strings>
<string>
<value segment_length="25">Your ride is on the way</value>
<context>
<message><![CDATA[Description: Banner shown after a rider books a trip.<br>Repo: <a href="https://github.example.com/acme/rider-app">rider-app</a>]]></message>
<imageURL><![CDATA[<img src="https://cdn.example.com/screens/ride_banner.png"> ]]></imageURL>
</context>
</string>
</strings>
Each <string> is a record: one string of your app with all its fields. Only value is translated. Record fields tell wxrks where each field sits inside the record, using XPath expressions (XPath is a short path that points to an element or attribute of an XML file, for example value/@segment_length):
Field | XPath in the example | What wxrks does with it |
|---|---|---|
Record |
| Finds every string of the file. |
Translatable text |
| Pairs each record with the segments of its text. |
Character limit |
| Sets the maximum length of the translation. |
Context |
| Shows the note next to the segment; optionally sends it to Context Sensitive translation. |
Reference images |
| Shows the screenshot next to the segment, or a link to it. |
All XPaths except the record one are relative to the record: write value, not //string/value. Only the record and translatable text XPaths are required; leave the others empty for fields your file doesn't have.
The fields are read on import. The exported file is identical to the original outside the translated text: the segment_length attribute, the context and the image elements are written back unchanged.
Before you start
Account Admins set Record fields on an XML filter in Settings > Translation > Filter settings, for the account or for one Organizational Unit. New projects use the default filter automatically. See How to Save File Parsing Settings as a Reusable Filter.
Project Managers can set them for one file while creating a project, in the file's Import settings.
Have a sample of the XML file at hand: you need its element and attribute names to write the XPaths.
Step 1: Open the XML filter or the file's import settings
Choose where to set the fields:
For every project (recommended): go to Settings > Translation > Filter settings and click Add filter. In File type, choose XML, and in Filter for XML, choose Custom. Give the filter a Name.
For one file: while creating a project, upload the
.xmlfile and click Import settings on it. In Filter for XML, choose Custom, or pick a filter your Account Admin already saved in Saved filters: it brings all the settings below.
Step 2: Extract only the translatable text
The context notes and image elements must not be translated. With the Custom filter, the Tag rules decide which elements are extracted:
Turn off Apply segmentation to text, so each string stays a single segment.
Under Segmentation rules, find Tag rules. The Custom filter already has the rule
<.*>EXCLUDE, which skips every element. Keep it.In Tag name, type the translatable element without angle brackets (
valuein the example) and click Add tag.Click the new
<value>rule and choose INCLUDE in Rule types. Only that element is now extracted.
💡 Tip: Before saving, check the result in Extraction preview at the top of the dialog: choose an Org Unit and the Source language, drop a sample file and click Preview. Only the translatable text should be listed, one segment per string. Nothing is created.
ℹ️ Note: If the parser extracts text that belongs to no record, that text is still translated, but it gets no limit, context or images.
Step 3: Point wxrks to the records and their text
Turn on Record fields.
In Record XPath, enter the element that holds each string, for example
//string.In Translatable text XPath, enter the element with the text to translate, relative to the record, for example
value.
wxrks pairs records and segments in file order and checks that their text matches, so a field never lands on the wrong string.
Step 4: Read the character limit
In Character limit XPath, enter where the limit sits, for example
value/@segment_length.In Over the limit, choose what happens when a translation is longer than the limit:
Warn (default): the segment can be confirmed, with a warning.
Block: the segment can't be confirmed, and the file can't be delivered while a translation is over its limit.
How the limit is counted:
Only the visible text counts. Tags and placeholders don't.
A record without a positive whole number (empty, zero or text) gets no limit.
If a string was split into several segments, the limit applies to all of them together.
💡 Tip: Choose Block when an over-limit string would break your app's layout and must never ship. Choose Warn when a reviewer may accept a slightly longer translation.
The limit works like the character limit of Excel files. See How to Configure and Use Target Char Limit in wxrks.
Step 5: Read the context
In Context XPath, enter the element with the note for translators, for example
context/message.Turn on Show the context in the Editor so translators see it next to the segment.
Optionally, turn on Use the context in Context Sensitive (up to 400 characters). Context Sensitive (CS) is the wxrks AI step that adapts translations to their surroundings; with this option, it also reads the note. Longer notes are cut at 400 characters, and links are removed before the note is sent.
If the note is HTML, wxrks turns it into readable text: line breaks stay, tags are removed, and each link becomes a button that opens in a new tab, named after the text before it (for example Repo). Only http and https links become buttons.
Step 6: Read the reference images
In Reference images XPath, enter the element that holds each screenshot, for example
context/imageURL. Each element can hold HTML image tags (imgwith asrcaddress) or a plainhttps://address; empty elements are skipped.In Reference images, choose how translators see them:
Show images in the Editor (default): wxrks downloads each image and shows it next to the segment, with its link.
Links only: each image shows as a link that opens in a new tab. Nothing is downloaded.
Make sure Show the context in the Editor is on: images and their links show only when it is.
ℹ️ Note: In Show images in the Editor, an image is downloaded only if its address is a public https:// URL to a PNG or JPEG file under 5 MB. An image that can't be downloaded (for example, a link that opens a login page) is skipped and the import goes on. The same image used by several strings is downloaded once.
💡 Tip: Choose Links only when your screenshots must stay on your own servers, or when they need a login that translators have.
Save the filter, or close Import settings and create the project.
Translating the file in the Editor (Vendors)
When you open a segment of a file imported with Record fields:
Character limit: the target header shows Max followed by the length and the limit, such as Max 35 / 25. When you type past the limit, the counter changes color and the characters beyond the limit are highlighted in the text. Shorten the translation until the highlight disappears. With Block, you can't confirm the segment while it's over the limit.
Context: the note shows next to the segment, with its links as buttons that open in a new tab.
Reference images: the screenshots show as images you can browse, or as Reference image links that open in a new tab.
If you don't see the context, check Show segment comments in the Editor's Settings tab: it shows or hides the notes that come with the segments of the file.
The QA check Target exceeds the segment's character limit also reports each translation over its limit. It is on by default; Account Admins and Project Managers can mark it Must fix so the issue can't be ignored at delivery. See How to use the wxrks QA Check Tool.
Troubleshooting
Problem | Cause and fix |
|---|---|
The import fails with "No record of … has the text …" | No segment of the file matched a record. Check that Record XPath finds the records and that Translatable text XPath points to the element you translate, relative to the record. |
The import fails with "Invalid XPath expression in the XML filter" | One of the XPaths has a syntax error. Copy the expression from the message and correct it. |
Context notes appear as segments to translate | The parser extracts the context element too. Set the Tag rules as in Step 2. |
Some strings have no limit | Their limit isn't a positive whole number, or their text wasn't paired with a record. |
Images don't show | Show the context in the Editor is off, the mode is Links only, or the image isn't a public |
The limit changed in the file | Update the source file of the project: the new limit replaces the old one. If a lower Block limit makes a confirmed translation too long, that segment goes back to unconfirmed. |
Quick reference
Setting | Default | Notes |
|---|---|---|
Record fields | Off | Required: Record XPath and Translatable text XPath. |
Over the limit | Warn | Block also stops delivery. |
Show the context in the Editor | Off | Also controls images and their links. |
Use the context in Context Sensitive | Off | Up to 400 characters; links removed. |
Reference images | Show images in the Editor | Up to 5 images per string; public |
Context text | — | Up to 4,000 characters and 10 links per string. |
Related articles







