- App Router:
createServerI18next(config)— returns{ getT, getResources, generateI18nStaticParams }bound to the config, so the server API no longer depends oninitServerI18nexthaving run first in the same module instance. Create it once in ani18n.server.tsand import from there: every caller then imports the module that holds the config, and neither module evaluation order nor a second bundling layer (Route Handlers live in their own) can reachgetTuninitialized.initServerI18nextand the module-level functions keep working. #2347 - App Router: default server state is keyed on
globalThis— a second copy ofnext-i18next/serverin the same process (another bundling layer, or the CJS build next to the ESM one) now sees the sameinitServerI18nextcall instead of throwing. The "not initialized" error also names the real requirement (before the firstgetT()in the process) and points atcreateServerI18next. #2347