← Todos os modelos

Textos traduzíveis, regras de plural, datas e moedas por locale, escrita da direita para a esquerda.

Spec — Internationalization

Status: draft · Created: 2026-11-10

1. Context and goal

The interface is used in several languages and regions, so every visible text, number, date and currency follows the reader's locale, including right-to-left scripts.

2. Functional requirements (EARS)

  • FR-1: THE SYSTEM SHALL take every visible string from translation files by key, with no user-facing text in the code, checked by a lint rule that fails the build.
  • FR-2: WHEN a locale lacks a key, THE SYSTEM SHALL show the text of the default locale and log the missing key once per session.
  • FR-3: THE SYSTEM SHALL choose plural forms with the CLDR plural rules of the locale, covering every category the locale defines.
  • FR-4: THE SYSTEM SHALL format dates, times, numbers and currencies with the conventions of the active locale and the time zone of the user.
  • FR-5: WHEN the active locale is written right to left, THE SYSTEM SHALL set the document direction to rtl and mirror layout, icons with direction and text alignment.
  • FR-6: WHEN a user first visits, THE SYSTEM SHALL choose the locale from the browser languages and fall back to the default locale when none is supported.
  • FR-7: WHEN a user changes the locale, THE SYSTEM SHALL apply it without a full reload within 300 ms and remember it for later visits.
  • FR-8: THE SYSTEM SHALL keep every layout usable with strings 40% longer than English, without clipped or overlapping text.

3. Out of scope

  • Translating user-generated content.
  • Machine translation of the strings.