FS FormScript

Localisation

Every locale, same answers

A translation is missing and the label is blank. Plurals are wrong in Arabic. Someone compared formatted strings and the stored amount changed.

what this buys you

  • Text lives in text blocks
  • CLDR plural categories
  • Values never depend on locale
  • A hole in a translation is visible
Language specification 1.0 · level 3 of 5

Promise. User-facing text lives in text blocks and resolves with a fallback chain that ends on the key itself — so a hole is visible. Plurals use CLDR categories. Data-plane results must not depend on locale; t, formatDate, and formatMoney cannot feed a stored value (E-TYPE-08).

Text has one home

Labels live in text blocks, never inline. A missing translation falls back to the key, so the hole is visible.

Plurals that are right

Plural categories come from CLDR, so Arabic and Polish are not an afterthought bolted on later.

Two planes, enforced

t, formatDate and formatMoney cannot feed a stored value. The type checker says no.

forms
form loan version = "1.0" {
  text {
    "income.annual" = "Annual income"
    "income.annual" @fr = "Revenu annuel"
  }
  field annual_income {
    type = number
    label = t("income.annual")
    validate { min = 0 }
  }
  output {
    annual_income: number
  }
}

French labels may change. The output number must not.

Boundary. Brand CSS and a translation management system are still yours. The host supplies CLDR data.