The proposed localization system provides opportunities for creating natural-looking translations of interface elements that are not driven into rigid frameworks and are not limited to 1 to 1 translation of reference phrases. On the one hand, Fluent makes it extremely easy to implement simple translations, but on the other hand, it provides flexible tools for translating complex interactions that take into account gender, plural declensions, conjugations, and other language features.
Fluent allows the creation of asynchronous translations, in which a simple string in English can be compared with a rather complex multi-variant translation in another language (for example, βVera added a photoβ, βVasya added five photosβ). At the same time, the Fluent syntax that defines translations remains fairly easy to read and understand. The system was originally designed for use by non-technical specialists, which allows the involvement of translators without programming skills in the process of translation and review.
shared-photos=
In {$userGender ->
[male] him
[female] her
*[other] them
} collection
{$userName} {$photoCount ->
[one] new photo added
[few] added {$photoCount} new photos
*[other] added {$photoCount} new photos
}.
The main element of translation in Fluent is the message. Each message is associated with an identifier (for example, "hello = Hello, world!"), which is attached to application code at the point of application. Messages can be either simple text phrases or multi-line scripts that take into account different grammar options and include
Fluent provides high error resilience - a poorly formatted message does not corrupt the entire translation file or adjacent messages. You can add comments to add contextual information about the purpose of messages and groups. Fluent is already being used to localize Firefox Send and Common Voice project sites. Last year, the migration of Firefox to Fluent began, at the moment already
Source: opennet.ru