@comvi/nuxt

Nuxt module for Comvi i18n with type-checked keys, ICU plurals and a component for markup inside translations
1,444 3
Install
npm install @comvi/nuxt
Latest Version:0.7.0
Vue:3
License:MIT
Last Updated:Oct 25, 2026
Links: GitHub  ·  npm
Maintainer: eugenebalabai

Comvi

Comvi i18n

A small, framework-agnostic i18n library with bindings for React, Next.js, Vue, Nuxt, Svelte and Solid,
and a platform that serves translations over a CDN.

npm version Bundle size CI License: MIT Comvi Platform

Documentation  ·  Quick start  ·  Live examples  ·  Comvi Platform


Comvi i18n puts translated text on screen from a catalog in your source or from the Comvi platform over a CDN. createI18n() returns the i18n instance, which holds the catalog, the current locale and t(); a binding hands it to your framework. ICU plurals, async loading, locale detection and the in-context editor are opt-in: you compose them with .use(), and an app carries only what it names.

Install

One package per framework; each binding brings @comvi/core with it.

npm install @comvi/react
npm install @comvi/next     # Peers: next ^15 || ^16, react ^18.2 || ^19
npm install @comvi/vue
npm install @comvi/nuxt
npm install @comvi/svelte
npm install @comvi/solid
npm install @comvi/core     # vanilla JavaScript
Framework Package Peer dependencies Guide Try it
Vanilla JavaScript @comvi/core none Vanilla StackBlitz
React @comvi/react react React StackBlitz
Next.js @comvi/next next, react Next.js StackBlitz
Vue @comvi/vue vue Vue StackBlitz
Nuxt @comvi/nuxt nuxt Nuxt StackBlitz
Svelte @comvi/svelte svelte Svelte StackBlitz
Solid @comvi/solid solid-js Solid StackBlitz

The packages are ESM-only and versioned in lockstep, so install matching versions of every @comvi/* package. The runtime packages need Node 20 or newer; @comvi/cli and @comvi/vite-plugin need Node 22.

Quick start

Create the i18n instance and hand it to React, in src/main.tsx:

import { createRoot } from "react-dom/client";
import { createI18n, I18nProvider, useI18n } from "@comvi/react";

const i18n = createI18n({
  locale: "en",
  fallbackLocale: "en",
  messages: {
    en: { greeting: "Hello, {name}!" },
    uk: { greeting: "Привіт, {name}!" },
  },
});

function App() {
  const { t } = useI18n();
  return <h1>{t("greeting", { name: "Alice" })}</h1>;
}

createRoot(document.getElementById("root")!).render(
  <I18nProvider i18n={i18n}>
    <App />
  </I18nProvider>,
);

createI18n builds the i18n instance, <I18nProvider> initializes it, and useI18n() gives your components t(), the current locale and setLocale(). The same three calls in every binding: Quick start.

Connect to Comvi

npm install @comvi/plugin-fetch-loader

Compose the loader on the instance, in src/main.tsx:

import { createRoot } from "react-dom/client";
import { createI18n, I18nProvider } from "@comvi/react";
import { cdnLoader } from "@comvi/plugin-fetch-loader";
import App from "./App";

const i18n = createI18n({
  locale: "en",
  fallbackLocale: "en",
}).use(cdnLoader({ cdnUrl: "https://cdn.comvi.io/<project-token>" }));

createRoot(document.getElementById("root")!).render(
  <I18nProvider i18n={i18n} fallback={<div className="spinner" />}>
    <App />
  </I18nProvider>,
);

.use(cdnLoader({ cdnUrl })) fetches each locale from the CDN, so a wording change ships when a translator saves it, without a redeploy. The CDN URL comes from Settings → Content Deploy in the Comvi project; the walkthrough is Connect to Comvi. If your keys use ICU ({count, plural, …}), add compiler: icuCompiler as on Plurals and ICU; the platform and the compiler are independent.

Plugins and tooling

Package What it does Docs
@comvi/plugin-fetch-loader Load translations from the Comvi CDN or API Fetch loader
@comvi/plugin-locale-detector Detect the locale from query, cookie, storage, browser Locale detector
@comvi/plugin-in-context-editor Edit translations inside the running app In-context editor
@comvi/vite-plugin Generate TranslationKeys from local JSON at dev/build Vite plugin
@comvi/cli Pull, push and generate types from the Comvi platform Comvi CLI

locale-routing and typegen are private workspace packages, inlined into the packages above at build time.

Repository

A pnpm + Turborepo monorepo: packages/ holds the workspace packages, examples/ the runnable StackBlitz demos, docs/design/ the design notes, test-apps/ this workspace's own CI apps and tooling/ the shared Vite/Vitest config. pnpm install && pnpm build && pnpm -w run test runs the whole thing; the gates a change has to pass are in CONTRIBUTING.md.

License

MIT © Comvi

Related Packages

nuxt-i18n-micro

Fast, lightweight i18n for Nuxt with strategy-based routing and minimal overhead...

233,728 251
@comvi/vue

Vue 3 integration for Comvi — composables, components, and type-safe translation...

2,098 2
@the-i18n-kit/nuxt

Nuxt module that publishes the layer graph and locale table Nuxt already resolve...

16,307 11
@nuxtjs/i18n

Internationalization for Nuxt

23,877,608 2,085

Version History

Version Released Vue License
0.7.0 ^3.0 MIT
0.6.0 ^3.0 MIT
0.5.0 ^3.0 MIT
0.4.1 ^3.0 MIT
0.4.0 ^3.0 MIT
Pre-releases (1)
Version Released Vue License
0.5.0-rc.1 ^3.0 MIT