Skip to content

[Translation] Add Mozilla Fluent support to Translation component #31268

@flaksp

Description

@flaksp

Description

Recently Mozilla released stable version of Fluent - it's specification for storing and managing translations in human-readable format. The main benefits of Fluent:

  1. It does not require any special software to manage translations because of pretty and clean syntax.
  2. It's standard.
  3. Pluralization is supported by standard.

Links:

Example

Fluent syntax looks pretty similar to YAML format used by symfony/translation, but much more flexible.

Symfony example:

apples_count: {0} There are no apples.|{1} There is one apple.|]1,Inf[ There are %count% apples.

Fluent example:

apples_count =
    { $apples_count ->
        [0] There are no apples
        [one] There is one apple
       *[other] There are { $apples_count } apples
    }.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions