gettext 1.1.0 copy "gettext: ^1.1.0" to clipboard
gettext: ^1.1.0 copied to clipboard

outdated

Platform agnostic dart implementation of gettext, a localization framework.

example/main.dart

import 'dart:convert';
import 'dart:io';

import "package:gettext/gettext.dart";

void main() async {
  final data = await File("./en_US.json").readAsString();

  final gt = new Gettext();
  gt.addLocale(json.decode(data));

  print(gt.gettext("Hello"));
  print(gt.ngettext("An apple", "%d apples", 1));
  print(gt.ngettext("An apple", "%d apples", 3));
}
7
likes
0
points
1.49k
downloads

Publisher

unverified uploader

Weekly Downloads

Platform agnostic dart implementation of gettext, a localization framework.

Repository (GitHub)
View/report issues

License

unknown (license)

More

Packages that depend on gettext