Search documentation

Search all pages, headings and text, in the current package or topic or in all documentation.

Without Next

Use active-i18n in a Vite app, another SSR framework or plain Node - the root and React entries need no Next.

@workspace/active-i18n 1.1.0Developmentunreleased, in development in Foundationbaseline ce081dc3

The root entry and /react never reach the server entries, and next is an optional peer. A site without Next loads its dictionaries itself, builds the translator with createTranslateFunction and passes the tree to <I18nProvider>.

TSX
import {createTranslateFunction} from '@workspace/active-i18n';import {I18nProvider} from '@workspace/active-i18n/react';
const translations = await loadDictionaries(locale); // your loaderconst t = createTranslateFunction(translations, locale); // in Node, a worker or the browser
<I18nProvider  locale={locale}  translations={translations}  supportedLanguages={languages}>  <App /></I18nProvider>;

What was proved#

On 2026-10-21 a temporary consumer outside any repository received active-i18n (with the other packages of this site) from Foundation through the managed transfer, in a React app on Vite without Next:

  • the tests translated with createTranslateFunction and rendered <I18nProvider> with useTranslations;
  • the test configuration made every import of next or server-only fail, and a guard test proved that the block was live: nothing the app loads reaches them;
  • the app typechecked strictly and built with Vite; verify-install reported the package current.

pnpm installs next into the package's own workspace project because it is an optional peer; the app never loads it.

What it does not cover#

Language switching in such a site follows the same contract: setLocale stores the choice through persistLocale and navigates. If your site switches without a navigation, remount the provider with the new locale and tree, as the Direction example does.

This page as Markdown