Get started

Languages

Leadvane ships in English with first drafts of Hindi, Russian, German and Bengali. Everything is set up so another language can be added without touching code paths: each surface has one catalog file and falls back to English for anything not yet translated.

Who sees which language

SurfaceLanguage comes from
Lead notifications, daily digests, uptime alerts, password-reset emailThe business's language: Settings → Language for notifications and status page
Public status page and its JSON?lang= (en, hi, ru, de or bn) if given, otherwise the business's language
Hosted form /f/…?lang=, then the business's language, then the visitor's browser
embed.js and status.js messagesdata-lang on the script tag, then the page's <html lang>, then the browser
DashboardThe address (/de/pipeline), then the person's saved choice (kept in their browser), then the business's language, then the browser

Form field names and lead data are never translated: a lead's fields arrive exactly as the visitor typed them.

Adding a language

  1. Server: copy apps/api/src/i18n/hi.ts to <code>.ts, translate the values, and register it in LOCALES and CATALOGS in src/i18n/index.ts. Set dir: 'rtl' for Arabic or Urdu.
  2. Dashboard: copy public/app/i18n/hi.json to <code>.json and add the code to DASHBOARD_LOCALES in public/app/js/core.js.
  3. Widgets: add a block to packages/sdk/src/i18n.ts, then npm run build:sdk.
  4. Run npm test: a test checks every translated key exists in English and uses the same {placeholders}.

Keys are flat and named by screen, such as statusPage.incidents. Placeholders look like {name}. For counts, add key_one and key_other and pass {count}; the right form is chosen with Intl.PluralRules, so languages with more plural forms can add them: Russian also defines key_few and key_many.

The dashboard

The dashboard's address carries the language, such as /ru/leads. Picking a language in the account menu, or opening an address with another code, switches it and saves the choice in that browser, so it survives reloads and restarts. Links without a code, such as those in emails, get the saved language.

Every screen uses t('screen.key'). For new text, add the key to en.json and to each other catalog; a test checks that they all have the same keys. Counted messages use key_one and key_other (Russian adds key_few and key_many) with {count}. Lead data, AI summaries, stored activity notes and error messages from the server are shown as written. The sign-up and password-reset pages are English only.

Every translation is a draft

Before offering Hindi, Russian, German or Bengali to customers, have a native speaker review that language's .ts and .json files and its block in the SDK.