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
| Surface | Language comes from |
|---|---|
| Lead notifications, daily digests, uptime alerts, password-reset email | The 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 messages | data-lang on the script tag, then the page's <html lang>, then the browser |
| Dashboard | The 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
- Server: copy
apps/api/src/i18n/hi.tsto<code>.ts, translate the values, and register it inLOCALESandCATALOGSinsrc/i18n/index.ts. Setdir: 'rtl'for Arabic or Urdu. - Dashboard: copy
public/app/i18n/hi.jsonto<code>.jsonand add the code toDASHBOARD_LOCALESinpublic/app/js/core.js. - Widgets: add a block to
packages/sdk/src/i18n.ts, thennpm run build:sdk. - 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.
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.