Repository navigation
Translator Workflow
Louis Wright edited this page Oct 14, 2026
·
1 revision
📄 Mirrors
docs/translator-workflow.mdin the main repo — the repo version is canonical.
Status: planned / pre-release. This page documents the intended API of next-tongue. Nothing is published yet; names may change before v1.0. See ROADMAP.
For teams that work with translators or a TMS, tongue export and tongue import round-trip messages through XLIFF 2.0 or CSV. Both are implemented with Node built-ins only (ADR 0012).
npx tongue export --format xliff --locale de,fr --out ./translations # one de.xlf, fr.xlf per locale
npx tongue export --format csv --locale de --missing-only # only untranslated/stale keys
npx tongue import ./translations/de.xlf # validates, then merges into messages/de.json-
XLIFF 2.0: one
<unit id="home.inbox">per key with<source>(default locale) and<target>. ICU placeholders and tags are kept as text;$descriptionbecomes a<note>.statereflectstongue.lock(initial,translated,final). -
CSV: columns
key,description,source,target, UTF-8 with BOM, RFC 4180 quoting. -
Import checks every target with the same validation as the build (ICU parse, arg/tag parity, CLDR plurals). Invalid rows are reported with
file:lineand not written.--dry-runprints the diff. Imported entries updatetongue.lock, sotongue checkstops reporting them as stale. - Stale targets (source changed since translation, per the hashes in
tongue.lock) are exported withstate="initial"and included by--missing-only(#42). - Keys from build-time
sources(Database messages) are exported read-only (translate="no"/ areadonlycolumn) and never imported into files.
Give translators what they need next to each key with a sibling $meta ($description remains a shorthand):
{
"save": "Save",
"save$meta": {
"description": "Button label in the editor toolbar",
"screenshot": "https://example.com/shots/editor-toolbar.png",
"maxLength": 12
}
}- Fed into
tongue translateprompts andtongue export(XLIFF<note>s andsize-restriction; CSVdescription,screenshot,maxLengthcolumns). -
tongue checkreports targets longer thanmaxLength(lengthcheck). - Stripped from compiled output (#43).
Guides
- Getting Started
- Configuration
- Routing and Proxy
- Server Components
- Client Components
- Server Actions
- ICU Messages
- Type Safety
- Cache Components and PPR
- Static Export
- Metadata SEO and hreflang
- Database and CMS Messages
- Dev Tools
- Translator Workflow
- Per-user Preferred Language
- CLI
- AI Translation
- Testing
- VS Code Extension
- Migration from next intl
- Migration from next international (deferred)
Reference