Skip to content

Fallbacks

A missing message is copied in at build time from the first locale in its chain that has it. The runtime looks nothing up.

export default defineConfig({
locales: ['en', 'de', 'de-AT', 'it'],
sourceLocale: 'en',
fallbacks: { 'de-AT': ['de'] },
// …
});
Locale Chain Why
de-AT de → en fallbacks, then the source
it en The source locale is always last
zh-Hant-TW zh-Hant → zh → en Its parents that are locales

fallbacks lists extra steps; a locale’s parents and the source locale are added. Intl follows the same chain for numbers, dates and plurals: with fur: ['it'], Friulian formats like Italian.

A step outside locales lends its formats, not its text: one that has catalogs fails the build.

Case Diagnostic Level
A message missing in a locale missing-translation: using "de" warning
A catalog file missing missing-file; every message falls back warning
The source locale’s file missing missing-file error
A key only in a translation unknown-key: dropped warning
A translation with other params param-mismatch error
A param or markup left out missing-param warning
A plural form the language uses missing-plural: few, many in Polish warning

A locale that fallbacks lists, or whose parent is a locale, leaves gaps by design: no missing-translation or missing-file. For a partial locale, fallbacks: { it: ['en'] }.

An empty translation, "", is a translation: it renders blank and does not fall back.

A translation may have fewer select branches than its source, as languages without gender do.

parla check --strict fails on warnings too, for CI once every locale is complete.

A borrowed message keeps its own language’s plural rules: English in a Japanese page says “1 item”. Its numbers and dates are the page’s.