Skip to content
Branch: master
Go to file
Code

Latest commit

dsainati1 authored and facebook-github-bot committed 22c6e3a Jul 10, 2020
Reviewed By: pieterv

Differential Revision: D22462377

fbshipit-source-id: 5c1d51e5b000a734c770d7a3e6b70fdf209cf154

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time

README.md

Travis CI Twitter Follow Discord Chat Facebook Group

FBT

FBT is an internationalization framework for JavaScript designed to be not just 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 See our React Native demo here

Requirements

Building the fbt library

git clone git@github.com:facebook/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 translated 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://facebook.github.io/fbt

Join the fbt community

See the CONTRIBUTING file for how to help out.

Change log

See CHANGELOG.

List of npm modules published from this repo:

How to release a new npm version

# Go to the module's folder (where package.json is located)
cd fbt-runtime/
# or
# cd packages/babel-plugin-fbt/
# cd packages/babel-plugin-runtime/

# publishes to npm and push new git tag to Github
yarn publish_to_npm_latest

License

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

You can’t perform that action at this time.