This document defines the phase-72 translation file format for
TODOS.phase-72.72.11.1.3. The canonical source format is .v2loc.json; XLIFF
and PO exports are derived vendor views and must preserve the same metadata.
Format Identity#
The canonical JSON schema is
V2/ue/Content/Localization/V2/Schemas/V2TranslationFileFormat.schema.json.
Every file uses schema v2.localization.translationFile.v1 and the extension
.v2loc.json.
Required top-level fields:
schemalocalesourceLocalegeneratedFromformatVersionentries
Entry Metadata#
Every translation entry must include:
id: canonicalloc.*string ID.tmsAlias: short alias without theloc.root.sourceText: source-locale text.translation: locale text. In source-locale files this matchessourceText.contextDescription: translator-facing context description.maxCharacterLength: UI budget for layout-constrained strings.screenshotReference: stable screenshot or capture reference.textRole: semantic role such astitle,button,subtitle,body, orscreen_reader_label.variables: named formatting variables.occurrencePaths: source files where the ID was found.state:source,needs_translation,translated,reviewed,approved, orblocked.
Context descriptions are required because identical source text can have different intent across UI, dialogue, store, accessibility, and privacy flows. Max character length is required so translation QA can detect layout overflow. Screenshot references are required when available so vendors can inspect the UI surface without opening the editor.
XLIFF And PO Mapping#
Vendor adapters can export .v2loc.json entries to XLIFF or PO:
idmaps totrans-unit@idin XLIFF andmsgctxtin PO.sourceTextmaps to XLIFFsourceand POmsgid.translationmaps to XLIFFtargetand POmsgstr.contextDescription,maxCharacterLength,screenshotReference,textRole, andvariablesare preserved as notes or extracted comments.
The JSON file remains the repository source of truth. XLIFF and PO files are export artifacts and must round-trip without changing IDs or metadata.
Sample#
The source-locale sample is
V2/ue/Content/Localization/V2/Translations/en-US.v2loc.json. It is generated
from V2/ue/Content/Localization/V2/Extracted/StringExtractionCatalog_V2.json
and includes registered string ID samples such as loc.quest.main_01.title,
loc.ui.menu.options, and loc.npc.blacksmith.greeting.
Verification#
Run this gate after changing the format, schema, sample file, or CI wiring:
python3 V2/ue/Tools/check-v2-translation-file-format.py
Required release gates:
localization-translation-file-format-contractlocalization-translation-file-format-schemalocalization-translation-file-format-contextlocalization-translation-file-format-max-lengthlocalization-translation-file-format-screenshotlocalization-translation-file-format-ci-wired