Lingvit

Translate any Astro site without rebuilding your routing

One script in your base layout translates all Astro pages, MDX content, and island components — including React, Vue, and Svelte islands rendered client-side.

What gets translated

  • Astro pages and layouts
  • MDX and Markdown content
  • React, Vue, and Svelte islands
  • Astro DB and content collections
  • Client-side island interactions
  • Static and server-rendered pages

Setup guide

  1. Create a Lingvit project

    Sign up at app.lingvit.com and create a project for your Astro site. Add your production domain.

  2. Add the script to your base layout

    Open your base layout file (e.g. src/layouts/Layout.astro) and add the Lingvit script before </body>:

    ---
    // src/layouts/Layout.astro
    ---
    <html>
      <head>...</head>
      <body>
        <slot />
        <script src="https://cdn.lingvit.com/widget/v1/widget.bundle.js" is:inline async></script>
      </body>
    </html>
  3. Select languages and deploy

    Choose target languages in the Lingvit dashboard and run astro build. Both static output and server-rendered pages are supported.

Frequently asked questions

Does it work with Astro islands (partial hydration)?

Yes. React, Vue, Svelte, and other framework islands hydrate client-side and render their content into the DOM — Lingvit's MutationObserver picks up their output as it appears.

Does it work with Astro's built-in i18n routing?

Yes. Astro's i18n routing handles URL structure (/fr/, /de/); Lingvit handles the actual translation of text content. They operate at different layers and do not conflict.

Static output or SSR?

Both. For static sites (output: 'static'), Lingvit translates on the client. For SSR (output: 'server' or 'hybrid'), Lingvit translates after the server-rendered HTML is hydrated in the browser.

Does it translate Astro content collections?

Yes. Content collection content (MDX, Markdown) is rendered to HTML by Astro, which Lingvit then observes and translates client-side.

Start translating your Astro site

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