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

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 = 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
150
points
1.25k
downloads

Publisher

unverified uploader

Weekly Downloads

Platform agnostic dart implementation of gettext, a localization framework.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

More

Packages that depend on gettext