framework designed to unleash the expressive power of the natural language.
fluent can be used both on the client-side and the server-side. You can
install it from the npm registry or use it as a standalone script (as the
npm install fluent
How to use
FluentBundle constructor provides the core functionality of formatting
translations from FTL files.
;const bundle = 'en-US';const errors = bundle;if errorslength// syntax errors are per-message and don't break the whole resourceconst welcome = bundle;bundle;// → 'Welcome, Anna, to Foo 3000!'
The API reference is available at http://projectfluent.org/fluent.js/fluent.
fluent requires the following
Intl.PluralRules(standard, new in ECMAScript 2018)
Find out more about Project Fluent at projectfluent.org, including documentation of the Fluent file format (FTL), links to other packages and implementations, and information about how to get involved.