Fluent (.ftl) Translation Files
Format and workflow for Mozilla's expressive localization system.
Fluent is Mozilla's localization system, designed to produce natural-sounding translations across languages with very different grammatical rules. A .ftl file holds translation messages with optional attributes, variables, and selectors — built-in branching on count, gender, or any other variable. A single Fluent message can produce different output based on the input, without code changes and without splitting into multiple keys. This is especially valuable for languages with complex plural and grammar rules (Polish, Arabic, Russian, Slavic languages generally) where gettext\'s plural rules and JSON's flat keys are not expressive enough.
- What it is: expressive localization syntax with selectors and attributes
- File extension:
.ftl - Standard body: Mozilla
- Encoding: UTF-8
- Plurals: CLDR via selector syntax (
{ $count -> [one] ... *[other] ... }) - Used by: Firefox, Thunderbird, MDN, Rust apps, i18next (via Fluent backend)
What a .ftl file looks like
Fluent messages are key = value, with optional .attribute children for things like button labels, tooltips, and accessibility text. Variables use { $name } syntax, selectors branch on a variable, and -term entries declare reusable terminology that can be referenced from other messages:
### German translations
# A simple message
welcome = Willkommen, { $name }!
# A message with attributes (button text + tooltip)
login =
.label = Anmelden
.tooltip = Melden Sie sich bei Ihrem Konto an
# Pluralization with selectors
items =
{ $count ->
[one] 1 Artikel im Warenkorb
*[other] { $count } Artikel im Warenkorb
}
# Term reference
-brand = Mein App
about = Über { -brand }Editing Fluent files
- VS Code with Fluent extension: syntax highlighting, validation, and snippets for selectors and attributes.
- Pontoon (Mozilla\'s own TMS): native Fluent support, used by Mozilla projects.
- Cloud TMS platforms: Locize imports and exports
.ftl; translators work in a CAT-style UI with translation memory and glossary.
Common Fluent workflows
- Mozilla / Firefox add-ons. Author messages in .ftl, ship them with the runtime. Use Pontoon or another TMS for translator handoff.
- Rust applications. Use the
fluent-rscrate to load and resolve .ftl files. Translators work outside the codebase. - JavaScript / i18next. The i18next Fluent backend lets you use Fluent syntax in i18next-based apps. Manage translations in Locize and export to .ftl for the build.
- Languages with complex grammar. When CLDR plural categories aren\'t expressive enough, Fluent\'s selectors handle gender, formality, and case-by-case branching cleanly.
How to translate Fluent files in Locize
Locize imports and exports .ftl files:
- Get started
- Import your
.ftlfile - Edit translations in the CAT view with translation memory, glossary, and style guide applied automatically
- Use bulk actions for AI / machine translation, then route results through a review workflow
- Export back to
.ftl— or convert to JSON, gettext, XLIFF, or any other supported format
Frequently asked questions
Fluent is Mozilla's localization system, designed to produce natural-sounding translations. A .ftl file holds translation messages with optional attributes, variables, and selectors that handle plurals, gender, and grammatical agreement. Fluent is more expressive than gettext or JSON: a single message can branch on count, formality, or device — without code changes.
Mozilla products (Firefox, Thunderbird, Mozilla Developer Network) and a growing number of open-source projects that need expressive plural and grammatical handling. Fluent is also used in some Rust applications via the `fluent-rs` crate and in JavaScript projects via i18next's Fluent backend.
Fluent's superpower is its selector syntax: a single message can produce different output based on count, gender, or any other variable, without splitting into separate keys. gettext supports plurals only; JSON has no native plural or selector logic at all (though i18next adds it on top). For languages with complex plural and grammar rules (Polish, Arabic, Russian), Fluent often produces more natural translations.
Any text editor with Fluent syntax highlighting (VS Code with the Fluent extension, IntelliJ). For team workflows use a translation management system that imports Fluent — Locize imports and exports `.ftl` files. Translators work in a CAT-style UI with translation memory and glossary, and the export round-trips back to .ftl for the build.
Yes — `# comment` for standalone, `## section` for section headers, and `### resource` for resource-level comments. Comments above a message are exported by translation tools as translator notes. This is one of Fluent's strengths over JSON, which has no comment support.
Mozilla provides bindings for several languages: `fluent-rs` (Rust), `fluent-js` (JavaScript), `python-fluent` (Python), and others. The runtime parses .ftl files and resolves messages with the right variables and selectors at runtime. i18next has a Fluent backend that uses the same syntax in projects already using i18next.