← All docs

Documentation

Quick start

Go from hardcoded strings to a translated app in minutes. No t() calls to write, no keys to manage — extract, translate, ship.

React + Vite

  1. 1Install

    Requires Node.js 20+ and a Hedgeling seat token, which every plan includes. See the React + Vite guide for registry setup, configuration, and troubleshooting.

    $ npm install @hedgeling/i18n
  2. 2Configure extraction

    .hedgeling/extract.config.json

    { "sourceLocale": "en-US", "locales": ["fr-FR", "de-DE"], "scanRoots": ["src"] }
  3. 3Add the build plugin

    vite.config.ts

    Not on Vite? The same plugin is built on unplugin and ships entry points for webpack, Rollup, Rspack, and esbuild — import from @hedgeling/i18n/webpack, /rollup, /rspack, or /esbuild instead.

    import { hedgelingI18n } from "@hedgeling/i18n/vite";
    export default defineConfig({ plugins: [react(), hedgelingI18n()] });
  4. 4Wrap your app

    main.tsx

    import { HedgelingProvider } from "@hedgeling/i18n/runtime";
    <HedgelingProvider><App /></HedgelingProvider>
  5. 5Extract and translate

    The --no-mt pass generates artifacts without machine translation. Configure a provider and review scope and cost before running translate without this flag.

    $ npx hedgeling extract --write
    $ npx hedgeling translate --no-mt

Other setups

Vue, Svelte & SvelteKit

The same bundler plugin auto-wraps Vue SFCs and Svelte 4/5 components (runes included). Point it at your Vite, webpack, Rollup, Rspack, or esbuild build and run the same extract and translate commands.

Angular

Angular keeps its own path: an ng generate schematic wraps templates, and translations are delivered by the runtime injector.

Any site, no build step

Drop the DOM injector script into any page — it translates rendered content by matching it against your bundle, with a MutationObserver for dynamic content. No code changes, no rebuild.

Full framework guides, the configuration reference, and the diagnostics catalog ship with the package — deeper docs are coming to this site.