Write your text in the code. Ship it in every language.
You write the sentence where it is used, and the compiler gives it a stable key, writes your translation files and types every param. This package is the runtime: a 3.35 KB runtime with zero dependencies, and a site with no framework ships 6.17 KB, both measured on every release.
t`Welcome back, ${name}`;
t('ESsQIvlA', { name });
Install
pnpm add verbaly @verbaly/vite
pnpm add -D @verbaly/compiler
npx verbaly init
import verbaly from '@verbaly/vite';
export default { plugins: [verbaly()] };
import { t, setLocale } from 'verbaly/app';
t`Hello ${name}`;
await setLocale('es');
Works with React · Next.js · Vue · Nuxt · Svelte · SvelteKit · Astro · webpack, Rollup, esbuild, Rspack · plain HTML, and on its own for text that comes from a CMS.
Why
- No key files to maintain: the compiler names each text and keeps every language file in step.
- Typed from the text: a wrong or missing param fails to compile.
- Broken translations never ship:
verbaly check stops a missing translation, and one that lost a {param} or a plural case, in CI.
Intl all the way: numbers, currency, dates, relative time, lists and plurals, with no dependency.
Learn more
📖 Docs · 🧩 API reference · 🔁 Coming from i18next · ⭐ GitHub
All packages share one version number. Verbaly is 0.x, and every change is in the changelog.
License
MIT © Aron Soto