fluent 2.0.3 copy "fluent: ^2.0.3" to clipboard
fluent: ^2.0.3 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
140
pub points
77%
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