Test your integration
Required scenarios
- Render the source locale with only the embedded source catalog.
- Switch to a loaded target catalog and verify values and rich component slots.
- Request a missing message and assert source fallback plus one
missing-translationdiagnostic. - Provide invalid ICU content and assert source fallback plus
invalid-translation. - Reject remote loading and assert the current/embedded source remains visible plus
catalog-load-failed. - Change locale twice quickly and verify the earlier request is aborted.
- Verify the
linguana_localecookie and optional preference callback.
SSR precedence
Create requests where override, signed-in preference, cookie, and Accept-Language disagree. Assert the first supported match wins in that order, including language-only matching.
Example diagnostic assertion
const diagnostics: DiagnosticEvent[] = [];
render(
<LocaleProvider {...props} onDiagnostic={(event) => diagnostics.push(event)}>
<Page />
</LocaleProvider>,
);
expect(diagnostics[0]?.code).toBe("missing-translation");Next
Use Catalog runtime troubleshooting when a browser test fails, then add the checks to CI.
Check language switching, original-language fallback, remote loading, and server rendering.
Last updated October 3, 2026
Did this page get you to a working result?