Localization library for expressive translations.
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
MessageContext constructor provides the core functionality of formatting
translations from FTL files.
;const ctx = 'en-US';const errors = ctx;if errorslength// syntax errors are per-message and don't break the whole resourceconst welcome = ctxmessages;ctx;// → 'Welcome, Anna, to Foo 3000!'
The API reference is available at http://projectfluent.io/fluent.js/fluent.
fluent requires the following
Intl.PluralRules(Stage 3 proposal)
For legacy browsers, the
compat build has been transpiled using the current
version of Babel's latest preset:
Find out more about Project Fluent at projectfluent.io, including documentation of the Fluent file format (FTL), links to other packages and implementations, and information about how to get involved.