Skip to content

Getting Started

Localive is a live in-context i18n editing toolkit. Click any text in your app, change the translation, and see updates instantly.

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

Wrap your app with LocaliveProvider and the i18next adapter:

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

Add useLocaliveTag to tag elements for in-context editing:

import { useLocaliveTag } from '@localive/react';
function Nav() {
const homeTag = useLocaliveTag('nav.home');
return <span {...homeTag}>{t('nav.home')}</span>;
}
vite.config.ts
import { defineConfig } from 'vite';
import { localive } from '@localive/vite';
export default defineConfig({
plugins: [
localive({
translationsPath: 'src/locales',
locales: ['en', 'fr', 'de'],
defaultLocale: 'en',
}),
],
});

Start your dev server and click the “Open Editor” button that appears in the bottom corner of your app. Any text tagged with a translation key becomes clickable — edit it and your locale JSON files update instantly.