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.

Changelog #

0.1.0 #

First release. The runtime half of l10n_plus, with zero dependencies.

  • L10nLocale: a locale value type with canonical parsing of en, pt_BR, zh-Hant-TW and friends.
  • L10nLocaleResolver: the locale → language → fallback chain used by generated AppLocalizations.of. With no exact match and no bare language it takes the first supported locale sharing the language, in the order given — en_NZ resolves to en_AU over en_GB because AU sorts first, and for no other reason. Arbitrary, stable, and documented rather than dressed up as a preference.
  • PluralOperands: the CLDR operands n, i, v, w, f, t, computed from a num. The rules themselves are inlined into generated code, so no rule table ships in an application. Note that a num cannot carry what CLDR calls v: 1.0 and 1 are the same value in Dart, so both have no visible fraction digits here.
  • BaseTranslations and AppLocaleBase, the interfaces generated code implements.
  • L10nCurrent: the cell behind AppLocalizations.current with global_translations: true. It holds a locale, not translations, so a deferred locale reads as itself once its chunk arrives; one owner at a time, asserted in debug.
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