Skip to content

Getting Started

Localive is a live in-context i18n editing toolkit. Click any tagged text in your app, change the translation, and see updates written straight to your locale files.

Terminal window
npm install @localive/react @localive/adapter-i18next @localive/vite i18next react-i18next

Wrap your app with LocaliveProvider and add the i18next adapter. The provider takes adapter, locales, and defaultLocale props directly — you do not pass a pre-built localive instance:

import { LocaliveProvider } from '@localive/react';
import { withI18next } from '@localive/adapter-i18next';
import i18n from './i18n';
function App() {
return (
<LocaliveProvider
adapter={withI18next(i18n)}
locales={['en', 'fr', 'de']}
defaultLocale="en"
>
<MyApp />
<LiveEditorOverlay />
</LocaliveProvider>
);
}

Add useLocaliveTag to tag elements for in-context editing:

import { useLocaliveTag } from '@localive/react';
function Nav() {
const { getTagProps } = useLocaliveTag();
return <span {...getTagProps('nav.home')}>{t('nav.home')}</span>;
}

The dev-server plugin intercepts save requests from the overlay and writes them back to your locale files on disk.

vite.config.ts
import { defineConfig } from 'vite';
import { localiveVite } from '@localive/vite';
export default defineConfig({
plugins: [
localiveVite({
translationsPath: 'src/locales',
locales: ['en', 'fr', 'de'],
defaultLocale: 'en',
}),
],
});

Start your dev server (npm run dev, ng serve, vite dev, etc.). When you activate the inspector, any text tagged with a translation key becomes clickable — edit it and your locale JSON files update instantly on disk.

In React/Vue the overlay renders an editor panel with a Save button. In Angular the overlay renders the same panel. In Svelte the overlay currently renders a toggle button to activate the inspector; further editor UI is planned.

  • CLI Tools — extract, validate, sync, and generate types from the command line
  • VS Code Extension — hover previews, autocomplete, go-to-definition, find references
  • Core Concepts — how adapters and auto-tagging work