Getting startedQuick start
Quick start
Connect an existing i18next app to Leo Translate in about five minutes. You’ll create a project, load translations over HTTP and push your first keys.
New project? Clone the leo-translate-starter repo instead — it’s already wired up.
1. Install the backend
Leo serves standard i18next JSON, so you only need the HTTP backend.
npmpnpmyarn
$ npm install i18next i18next-http-backend2. Configure i18next
Point loadPath at your project’s endpoint. You’ll find it under Settings → API.
src/i18n.ts
import i18next from 'i18next' import HttpBackend from 'i18next-http-backend' await i18next.use(HttpBackend).init({ fallbackLng: 'en', ns: ['common'], backend: { loadPath: '[YOUR LEO ENDPOINT]/{{lng}}/{{ns}}.json' }, })
3. Add your first keys
Import your existing locales/en/common.json from the dashboard, or create keys one by one in the key editor.