TranslationCatalog.localesPerKey constructor

const TranslationCatalog.localesPerKey({
  1. required String name,
  2. required String file,
  3. String template,
})

Every locale under each key, in one file: strings.json holding {"save": {"en": "Save", "nl": "Opslaan"}}.

What a catalog looks like where a human or a translation service fills in languages a key at a time — the row is the unit of work, so the row holds every language.

TranslationCatalog.localesPerKey(
  name: 'server',
  file: 'tool/translations/strings.json',
)

Implementation

const factory TranslationCatalog.localesPerKey({
  required String name,
  required String file,
  String template,
}) = LocalesPerKeyCatalog;