Localisation
The translation editor opens the files software is translated in - XLIFF, gettext PO, Apple
String Catalogs, or a one-language file with its translation: Android strings.xml, Apple
.strings, JSON messages, Flutter ARB, .NET .resx - and puts each string's source and
translation side by side. Saving writes the file back in its own format with only the translated strings
changed, so a diff shows the translation and nothing else.
Placeholders and inline tags are kept as tokens that can be moved but not broken; plural strings get one field for each form the language has, labelled with the numbers that take it; ICU messages are previewed with sample values; right-to-left languages are edited right to left. A translation memory offers earlier translations, a glossary marks the terms to use and the ones not to, and checks run as you type.
Try it with your own files in confidence: they are opened by your browser, on your device. Nothing is uploaded, no copy reaches us or anyone else, and nothing is kept once you close this tab.
A Polish catalogue, part way through
A made-up booking app's gettext file. One string needs review, one has lost a placeholder, and Polish needs three plural forms where English has two. The team's memory and glossary are loaded: fill what the memory can, then see what is left and what is wrong.
// Node 18 or later, from the Pro or Gold package: fail the build when a translation breaks the app.
import { readdirSync, readFileSync } from 'node:fs';
import { checkTranslation } from './dist/node/bmx-translation-editor.mjs';
let failed = false;
for (const name of readdirSync('po').filter(n => n.endsWith('.po'))) {
const { issues, progress } = checkTranslation({ target: { name, text: readFileSync(`po/${name}`, 'utf8') } });
const errors = issues.filter(i => i.severity === 'error');
console.log(`${name}: ${progress.byState.translated.units + progress.byState.approved.units} of ${progress.units} translated, ${errors.length} errors`);
for (const e of errors) console.log(` ${e.unitId}: ${e.message}`);
failed ||= errors.length > 0;
}
process.exitCode = failed ? 1 : 0;
An app's messages, into Arabic
The same app's web messages as JSON - the English file and the Arabic one beside it - edited right to left. Arabic has six plural forms; the translation of the booking count has only two, and the check says which are missing. Fill them in, then save: the page keeps the file instead of downloading it, to show only the translations changed.