1. React
  2. ReactEurope
  3. 2019
  4. FBT: An i18n Framework for Complex Grammar & UI

FBT: An i18n Framework for Complex Grammar & UI

John Watson at ReactEurope 2019

Writing UI that can be accurately translated often comes with tradeoffs. If the text is sufficiently complicated, engineers have to take great pains (write conditionals, which are often error-prone) to ensure it is accurately rendered in other languages. Additionally, engineers are often either required to (a) keep strings separate from UI, or (b) keep translatable text simple enough to be extracted from UI source. Fbt is an explicit markup language that tackles complexity and keeps UI text bundled with the relevant source code. This has the added benefit of keeping UI source self-documenting. This markup is parsed at build-time with text collected and sent to translators. The framework enables engineers to write text that would normally be tedious and error-prone in a succinct and accurate way.