Lingvit

Fine-grained reactive translation for Solid.js & SolidStart

Built for Solid's reactive model. @lingvit/solid updates localized text nodes directly without re-rendering parent components or recalculating DOM trees.

What gets translated

  • Fine-grained reactive signals and memos
  • SolidStart SSR, streaming, and static site generation
  • Dynamic route parameters and <A> navigation
  • Nested components and suspense boundaries
  • Zero virtual DOM overhead
  • HTML head meta tags and hreflang
  • Custom reactive switcher component
  • Fallback language and offline cache

Setup guide

  1. Install @lingvit/solid

    Install the SDK via npm or pnpm.

    npm install @lingvit/solid
  2. Wrap your root with LingvitProvider

    Configure the provider in your main entry file.

    import { LingvitProvider } from '@lingvit/solid';
    
    render(() => (
      <LingvitProvider projectKey="lng_pk_...">
        <App />
      </LingvitProvider>
    ), document.getElementById('root')!);
  3. Translate strings with useLingvit()

    Use reactive translate primitives in your components.

    import { useLingvit } from '@lingvit/solid';
    
    function Hero() {
      const { t } = useLingvit();
      return <h1>{t('Welcome to our app')}</h1>;
    }

Frequently asked questions

Does it re-render components on language change?

No. Thanks to Solid's fine-grained reactivity, only the specific text DOM nodes update when language switches.

Does it work with SolidStart SSR?

Yes. SolidStart SSR and streaming are fully supported with localized initial HTML.

Can I use it without wrapping strings in functions?

Yes. You can also use the embeddable script widget which observes and translates the DOM automatically without code changes.

What is the bundle footprint?

The core Solid adapter adds less than 2KB gzipped to your bundle.

Start translating your Solid.js site

A monthly word generation allowance for new translations. Cached delivery uses no extra allowance.