smcueto / fbt

A JavaScript Internationalization Framework

Home Page:https://facebookincubator.github.io/fbt

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

FBT is an internationalization framework for JavaScript designed to be both powerful and flexible, but also simple and intuitive. It helps with the following:

  • Organizing your source text for translation
  • Composing grammatically correct translatable UI
  • Eliminating verbose boilerplate for generating UI

Examples

See our demo here

Requirements

Building the fbt library

git clone git@github.com:facebookincubator/fbt.git
cd fbt
yarn install

NOTE: if you make changes to the fbt runtime that you'd like to test in the demo-app, be sure to run this command to rebuild the JS code:

yarn build-runtime

Using fbt

See how to use the source directly with Babel and Webpack in our demo-app.

How FBT works

FBT works by transforming your <fbt> and fbt(...) constructs via Babel plugins. These plugins serve to extract strings from source and lookup translate payloads generated at build-time. FBT creates tables of all possible variations for the given fbt phrase and accesses this at runtime.

Full documentation

https://facebookincubator.github.io/fbt

Join the fbt community

See the CONTRIBUTING file for how to help out.

License

FBT is MIT licensed, as found in the LICENSE file.

About

A JavaScript Internationalization Framework

https://facebookincubator.github.io/fbt

License:MIT License


Languages

Language:JavaScript 98.7%Language:CSS 1.2%Language:PHP 0.1%Language:HTML 0.0%