Skip to main content

Flutter ARB format (.arb)

The Flutter ARB format reads .arb files, the JSON message-resource format used by Flutter's gen-l10n tooling and the Dart intl package. Each file is monolingual: one locale (named by @@locale, or inferred from the filename), where resource keys map to ICU MessageFormat message strings.

Each message becomes a translatable block. Sibling @<id> objects describe a resource (its description and placeholders) and @@<global> keys hold file metadata (@@locale, @@last_modified, @@author, @@context); both are preserved verbatim and never extracted. An ICU placeholder ({name}) is protected as an inline code. A plural ({count, plural, …}), selectordinal or select ({g, select, …}) is read with its branches: the words of each branch are translated and edited one branch at a time, with # and any placeholder inside a branch protected as inline codes, while the keyword, the branch keys and the layout are written as they were read. @description is surfaced as a translator note. Output is byte-faithful: key order, JSON escaping, and all @/@@ metadata round-trip untouched, and an edit rewrites only the value it changes.

IDarb
SourceBuilt-in
Extensions.arb
MIME Typesapplication/json
CapabilitiesRead + Write

Parameters

ParameterTypeDefaultDescription
descriptionNotesbooleantrueSurface the human-facing context in a resource's sibling "@<id>" attributes object as developer notes: the resource "description" plus each placeholder's "example"/"description" hint. The attributes object is always preserved byte-faithfully on round-trip regardless of this setting.

Configure it live

Configuration
Loading form…

Examples

Ignore descriptions

Do not turn @description values into translator notes.

descriptionNotes: false

Processing notes

  • One file = one locale; the message value is the block's source content.

  • @<id> attribute objects and @@<global> metadata are preserved but not extracted as translatable content.

  • ICU placeholders are protected as inline codes; plurals, selectordinals and selects are read with their branches, and an edit to one branch changes that branch alone.

  • kapi extract leaves a message holding a plural or select out of an XLIFF or PO exchange file and names it; kapi translate translates each of its branches.

← Back to the Format Reference