Katkat

Design a Runtime Localization System

AdobeSoftware Engineer · Onsite

Last updated

Design a runtime localization system for dozens of countries with locale and regional resolution, variables, plural rules, safe fallback, and offline-capable bundles. Address live copy updates, approvals, rollbacks, formatting, missing translations, cache behavior, and longer-text layout failures.

Question

Design a localization system for a product released in dozens of countries. Every user-facing string should resolve by locale, support variables and language-specific plural rules, fall back safely when a translation is absent, and allow copy updates without requiring an application release. The design must also detect missing translations and layout problems caused by longer text.

Constraints & Assumptions

  • Locale may include language and region, such as zh-TW or en-GB.
  • Human-authored translations are primary; a default-language bundle ships with the application.
  • Clients cache downloaded resource bundles and may start offline.
  • Runtime locale switching should not require a process restart.
  • Dates, numbers, currencies, and plurals use locale-aware formatting rules.

Clarifying Questions to Ask

  • Which clients and release versions must consume the same translation catalog?
  • How quickly must an edited string become visible?
  • Is fallback allowed for every string, or must legally sensitive text block release when missing?
  • Who approves translations and rollbacks?
  • Are experiments allowed to vary copy within one locale?

Hints

Hint 1

Use semantic keys: Map stable identifiers such as `checkout.button.confirm` to localized message templates; using English prose as the key couples copy edits to every translation.

Hint 2

Treat messages as structured templates: Use a locale-aware message format for variables, selection, and plural categories instead of concatenating fragments.

Follow-up questions

  • How would you prevent a translator from removing a required placeholder?
  • How should a client choose among `zh-TW`, `zh`, and the default locale?
  • How would you support copy experiments without fragmenting the catalog?
  • What would you test before adding a right-to-left language?