Skip to content

Send files directly between devices over the internet - no cloud storage, no size limits.

2.1 KB
Raw Blame

Internationalization

AlterSend uses @altersend/locales for shared locale metadata, locale resolution, i18next setup, and translation catalogs.

The language UI is live: desktop and mobile let users pick from the supported locales below, and the active locale is resolved from the user's preference — falling back to the system locale, then en-US.

Supported Locales

SUPPORTED_LOCALES in packages/locales/src/locale.ts is the source of truth — this list mirrors it, in the same order:

  • en-US
  • en-GB
  • de-DE
  • es-419
  • es-ES
  • fr-FR
  • it-IT
  • pt-BR
  • ja-JP
  • ko-KR
  • zh-CN
  • zh-TW
  • ru-RU

system is a preference, not a concrete locale. It is resolved with resolveLocalePreference(preference, systemLocales), which falls back to en-US when no supported match exists.

All currently published locales are LTR. Locale metadata has a dir field so RTL can be added later, but RTL is not part of this release surface.

Catalog Layout

Catalogs live in packages/locales/src/locales/<locale>/<namespace>.json.

Namespaces:

  • common
  • send
  • receive
  • settings
  • onboarding
  • feedback
  • errors
  • native

Use stable, semantic keys grouped by screen or behavior. Prefer send.status.uploaded over keys that describe a visual location. Use i18next plural keys with count, _one, and _other.

Adding a Locale

  1. Add the locale to SUPPORTED_LOCALES in packages/locales/src/locale.ts.
  2. Add packages/locales/src/locales/<locale>/ with every namespace file.
  3. Add the locale imports to packages/locales/src/resources.ts.
  4. Run npm test -w packages/locales.
  5. Run app typechecks and visually inspect long labels on desktop and mobile.

Review Workflow

AI-generated translations are acceptable as a first draft, but they must keep every key present and non-empty. Before release, review visible flows in at least de-DE, fr-FR, es-419, ja-JP, and zh-TW, because those catch most length and script issues.

Do not add skip or todo tests for missing translation work. Keep catalog parity tests passing instead.