Skip to main content

l10n_plus 0.1.0 copy "l10n_plus: ^0.1.0" to clipboard
l10n_plus: ^0.1.0 copied to clipboard

Minimal runtime for type-safe generated Flutter/Dart localizations.

l10n_plus #

Runtime for translations generated by l10n_plus_generator.

Zero dependencies, pure Dart, no Flutter. Generated translations are usable from servers, CLIs and unit tests; add l10n_plus_flutter for the widget layer.

This package is small on purpose. Everything that can be decided while generating code is decided there, so what ships is:

  • L10nLocale — a locale value type with canonical parsing.
  • L10nLocaleResolver — the locale → language → fallback chain.
  • PluralOperands — the CLDR operands n, i, v, w, f, t. The rules themselves are inlined into the generated code, so no rule table ships.
  • The interfaces generated classes implement.

You do not call any of this directly. Add it as a dependency, point the generator at your translations, and use the API it writes:

final t = AppLocalizations.forLocale(AppLocale.en);
t.auth.login.title;                  // 'Log in'
t.wallet.cards(count: 3);            // '3 cards'

Full guide, configuration and design notes: the repository README and docs/architecture.md.

0
likes
160
points
366
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Minimal runtime for type-safe generated Flutter/Dart localizations.

Repository (GitHub)
View/report issues

Topics

#localization #i18n #l10n #translation #intl

License

MIT (license)

More

Packages that depend on l10n_plus