React SSR example
createI18n is intentionally request-scoped. The same pattern works with React's streaming APIs or renderToString:
Avoid keeping a mutable active locale in a server-wide singleton. Create one translator per request, and serialize that request's locale and catalogs for client hydration.