INNER CODE UNIT · TypeScript

missingNs

i18next/next-i18next · src/appRouter/server.ts:265

  const missingNs = nsArray.filter(n => !i18nInstance.hasLoadedNamespace(n, { lng }))
  if (missingNs.length > 0) {
    await i18nInstance.loadNamespaces(missingNs)
  }

  const resolvedNs = ns
    ? (Array.isArray(ns) ? ns[0] : ns) as string
    : config.defaultNS

  return {
    t: i18nInstance.getFixedT(lng, resolvedNs, options.keyPrefix as string | undefined),
    i18n: i18nInstance,
    lng,
  } as any
}

/**
 * Extract loaded resources from the server i18next instance for passing to I18nProvider.

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…