Fluent is a localization system designed to unleash the expressive power of the natural language.
This repository contains the specification, the reference implementation of the parser and the documentation for Fluent.
FTL is the syntax for describing translation resources in Project Fluent. FTL stands for Fluent Translation List. Read the Fluent Syntax Guide to get started learning Fluent.
The syntax/
directory contains the reference implementation of the syntax as
a LL(infinity) parser.
The spec/
directory contains the formal EBNF grammar, autogenerated from the
reference implementation.
While working on the reference parser, use the following commands to test and validate your work:
npm test # Test the parser against JSON AST fixtures.
npm run lint # Lint the parser code.
npm run generate:ebnf # Generate the EBNF from syntax/grammar.js.
npm run generate:fixtures # Generate test fixtures (FTL → JSON AST).
npm run build:guide # Build the HTML version of the Guide.
npm run bench # Run the performance benchmark on large FTL.
This repository contains the reference implementation of the parser. Other implementations exist which should be preferred for use in production and in tooling.
- The JavaScript implementation at
fluent.js
, including the React bindings. - The Python implementation at
python-fluent
. - The Rust implementation at
fluent-rs
.
We also know about the following community-driven implementations:
Fluent.Net
by @blushingpenguin. See #93 for more info.- A Java/Kotlin implementation has been requested in #158.
elm-fluent
by @spookylukeyFluent
as a Perl 6 module by @alabamenhu- A Lua implementation effort is underway at
fluent-lua
by @alerque. - A D implementation effort is underway at
fluentd
by @SirNickolas.
Find out more about Project Fluent at projectfluent.org and discuss the future of Fluent at Mozilla Discourse.