Use case
Multilingual static site
You build with Astro, you want ten languages, and you do not want a kilobyte-heavy runtime to serve them.
The problem
- Client-side i18n adds weight and a flash on first paint.
- Keeping ten file trees in sync by hand turns into a job.
- Every text fix triggers a full rebuild and redeploy.
What Sonenta changes
@sonenta/astrofetches the bundles at build time and inlines them into the static HTML. Zero client JavaScript.- A
sonenta:i18nvirtual module exposes the catalogues, with fallback to the source language. - Per-screen variants arrive as a CDN overlay, with no second tree to maintain.
This page is the proof: sonenta.com runs on it, in 13 languages. The text you are reading was fetched from the CDN at build time.
Where to start
// astro.config.mjs
import sonenta from "@sonenta/astro";
export default defineConfig({
integrations: [
sonenta({ project: "proj_xxx", version: "main",
locales: ["fr","en","es"], defaultLocale: "fr" }),
],
});
// dans un composant : zéro JavaScript client
import { getT } from "sonenta:i18n"; Known limits
- Bundles are frozen at build time. Publishing a translation afterwards takes a new build of the static site, unlike an app that loads at runtime.
- Font subsetting and per-script settings stay yours. Sonenta delivers the text, not the typography.
Going further
Down to the last word.
Ready to adapt your product to every user?
Start free in minutes. No credit card, no commitment, and your exports always open.