Locale File Translation
Locale File Translation (Strings)
Locale file is one of the three file modes supported by Project Translation, built for key-value resource files (key = value). Transbox parses the file into segments keyed by their path, lets you translate them one by one, and writes them back into the original structure on export.
Supported Formats
| Format | Extension |
|---|---|
| JSON (including Flutter ARB) | .json, .arb, .arb.json |
| YAML | .yaml, .yml |
| Excel | .xlsx |
| GNU gettext | .po, .pot |
| Java Properties | .properties |
| Android strings | .xml |
| iOS strings | .strings, .stringsdict |
| Subtitles | .srt |
The same extension can mean different things per mode: .xml is parsed as Android strings in Locale file mode but as generic XML in Document mode; .xlsx is parsed as Key/source columns in Locale file mode. The mode you pick when adding a file decides which parser runs.
Parsing Rules
- Key-based extraction: each leaf string becomes a segment and keeps its path (e.g.
navigation.home), which is restored on export - Type preservation: JSON
number/boolean/nullvalues keep their type and are written back as values, not strings - Placeholders and inline tags:
{name},%s,%1$@,<b>,<a href>are treated as protected chunks and rendered as tags in the editor so they are not accidentally deleted - Duplicate detection: segments with identical source text are flagged, and can be filtered as "first occurrence", "other duplicates" or "not duplicated"
Workflow
1. Create a project
- Smart Translation → Project Translation
- New project: name, notes, source language, target languages
- You land on the project's file list
2. Add locale files
- Click Add file inside the project
- Pick the Locale file mode
- Choose the file, confirm source and target languages
- The file list shows the key count and update time
3. Translate in the editor
Click the file name or Translate to open the editor, which has four layers:
- Header: file name, source/target language switcher, version log, preferences, submit, export, import translations
- Toolbar: search (key/source/target), stage filter, more filters, batch operations, QA, file analysis, pre-translate, re-parse
- Three columns
- Left: segment list (index, source, target, status marks)
- Middle: the target editor for the current segment, with Edit history / QA / Comments tabs below
- Right: vertical tabs for Corpus (TM → termbase → MT), Add term and AI assistant
- Status bar: progress, paging and other state
4. Export
Export in the header (or More → Export in the file list) produces:
- Translated file: original format, original key structure
- Excel comparison: source and target in two columns
- XLIFF: for other CAT tools or external translators
- JSON: a uniform comparison structure
The scope can be narrowed by file, language and key conditions (search text, stage, marked, duplicate type, change source).
5. Import translations back
Import translations accepts .json / .xlsx / .xliff / .xlf with options:
- Auto confirm: mark imported segments as confirmed
- Write to memory: store the imported pairs as memory entries
- Push to stage: place segments at translation / review / proofreading / published
The project-level Import translations handles several files at once.
Translation Aids
Memory and termbase matching
The right-hand Corpus panel shows memory matches, termbase matches and MT results in order, each applicable in one click. Matching refreshes whenever you switch segments.
Pre-translation
Pre-translate processes the untranslated segments in the current filter:
- TM first: use memory matches, fall back to MT for misses
- TM only: memory only, no translation cost
- MT only: machine translation for everything
Set the minimum TM match rate (default 70%). A progress bar runs and can be stopped at any time; the summary reports TM hits, MT results and failures.
Batch operations
Batch operations apply only to the current filter:
- Update stage (target stage + confirm flag)
- Clear translations
- Copy source to target
- Copy the translation to another language
- Run QA on the range
- Smart tag fill (complete inline tags in target following the source order)
Each run asks for confirmation and shows progress.
QA checks
QA compares structural elements between source and target: missing/extra placeholders, HTML tag count and pairing, missing/extra variables, leading/trailing whitespace, punctuation, number counts, special characters, terminology consistency, URL count and modification, newline counts, and inline tag presence/order/pairing/nesting.
Results are listed in the QA tab of the middle column and can be ignored or restored individually; unignored issues count toward the segment and project QA totals.
File analysis
File analysis reports, for the current target language: segment count, source/target character counts, translated / untranslated / confirmed / MT / QA segment counts, internal repetition (total, propagable, group count), applied TM match distribution (100% / 90-99% / 80-89% / … / unmatched) and stage distribution — useful for judging delivery status and workload.
AI assistant
The AI assistant tab opens a session scoped to the current segment and target language: explain the source, propose alternatives, check tone. The project-level AI prompt in Project settings acts as the system prompt for every segment in that project. More → Agent translate in the file list lets the agent translate a whole file following the project prompt.
Shortcuts
| Shortcut | Action |
|---|---|
Ctrl + Enter | Confirm the current translation and go to the next segment |
Ctrl + S | Save the current translation |
Ctrl + F | Open find & replace |
Alt + ↑ / ↓ | Previous / next segment |
Ctrl + Shift + C | Copy the source text |
Ctrl + 1 | Apply the first memory match |
Ctrl + M | Apply or generate machine translation |
Notes
- Never drop protected tags: placeholders and inline tags in the target must match the source, or both the application and QA will complain
- Re-parse after source changes: when keys are added or removed, use More → Re-parse; existing translations are kept by key
- Plan limits: files per project and characters per file are capped
- Filter before export: to deliver only reviewed segments, filter by stage first
- Submit advances the review round: Submit increments the file's pending review version, marking the current segments as submitted; use the version log to review the change history of the file and its segments
FAQ
Q: Why is the "Locale file" card greyed out?
A: Your plan does not include locale files. Upgrade the plan, or add the file with the Document mode.
Q: The key count is lower than the number of entries in the file. Why?
A: Only leaf strings are counted. Nested objects are containers, and comments or empty objects are not segments.
Q: Some exported values turned into strings.
A: Check whether the original value was a number/boolean/null. If the source was a quoted string, the export keeps it a string.
Q: Does re-parsing lose translations?
A: No. Re-parsing aligns by key and keeps existing translations; keys that disappeared are dropped.
Q: Can it extract strings directly from source code?
A: Not currently. Generate a resource file with your existing i18n extraction step, then add it to a project.
Q: How are multiple target languages handled?
A: One file can carry several target languages; switch languages in the editor header. Use Copy translation to another language to seed a draft in the other languages.
