Kite docs

Localisation

Five locales, right-to-left, and the widgets that keep layout honest.

What ships

English, Spanish, French, Japanese and Arabic. Sources are lib/l10n/app_*.arb; the generated Dart lands in lib/l10n/ and is committed, so the repo builds without an extra step.

flutter gen-l10n

Using a string

final l = L.of(context);
Text(l.actionSave);
Text(l.pageOf(page, pages));   // placeholders are typed

Adding a string

  1. Add the key to lib/l10n/app_en.arb, with an @key entry if it takes placeholders.
  2. Add it to the other four .arb files.
  3. Run flutter gen-l10n.

Adding a locale

  1. Copy app_en.arb to app_<code>.arb and translate.
  2. Add a case to KiteLocale in lib/core/l10n/locale_controller.dart, with its native name — the picker shows native names, since someone looking for their language is not reading English.
  3. Run flutter gen-l10n.

Right-to-left

Arabic is included on purpose. It is the cheapest way to keep the layout honest — a UI that has never rendered right-to-left is usually full of hard-coded left padding nobody noticed.

Switching Kite to Arabic the first time exposed exactly that: every Align, padding and border in the app was LTR-literal.

Use the directional variants in anything you add:

Instead ofUse
Alignment.topLeftAlignmentDirectional.topStart
Alignment.centerLeftAlignmentDirectional.centerStart
EdgeInsets.only(left:)EdgeInsetsDirectional.only(start:)
Border(right:)BorderDirectional(end:)
Positioned(right:)PositionedDirectional(end:)

Row, Padding.symmetric and Expanded are already direction-aware. The trap is only the ones naming a physical side.

Coverage

Honestly stated: navigation, shell chrome, settings and the auth strings are localised. Screen bodies still hold English literals — the infrastructure and the pattern are in place, and extraction from here is mechanical rather than design work.

Formatting

KiteFormat wraps intl for money and counts. It currently pins a symbol; for a multi-currency app, pass the locale through and let NumberFormat.currency resolve it.

KiteFormat.money(1264.55)   // $1,264.55
KiteFormat.count(3412)      // 3,412