fluent 2.0.1 copy "fluent: ^2.0.1" to clipboard
fluent: ^2.0.1 copied to clipboard

Fluent is a Dart implementation of Project Fluent, a localization framework designed to unleash the expressive power of the natural language.

example/main.dart

import 'package:fluent/fluent.dart';

void main() {
    FluentBundle bundle = FluentBundle("en-GB");
		bundle.addMessages('''your-score =
    { NUMBER(\$score, minimumFractionDigits: 1) ->
        [0.0]   You scored zero points. What happened?
       *[other] You scored { NUMBER(\$score, minimumFractionDigits: 1) } points.
    }''');
		String? translated = bundle.format("your-score", args: {'score': 0.0});
		print(translated);
		translated = bundle.format("your-score", args: {'score': 3.14});
		print(translated);
}
19
likes
110
pub points
78%
popularity

Publisher

verified publishermetaware.dev

Fluent is a Dart implementation of Project Fluent, a localization framework designed to unleash the expressive power of the natural language.

Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache-2.0 (LICENSE)

Dependencies

intl

More

Packages that depend on fluent