im_localized 0.0.14 copy "im_localized: ^0.0.14" to clipboard
im_localized: ^0.0.14 copied to clipboard

Flutter ICU compatible Localization library with support for JSONs, runtime parsing and injecting

im_localized #

Flutter ICU compatible Localization library with support for JSONs, runtime parsing and injecting

Features #

  • ICU compatible
  • parsing JSONs
  • runtime parsing and injecting of localizations

Getting started #

Installation #

flutter pub add im_localized

Or add to your pubspec.yaml:

dependencies:
  im_localized: <last_version>

Usage #

Checkout example/lib/main.dart for complete example.

void main() async {
  runApp(
    ImLocalizedApp.fromList(
      /// initial translations loaded from RAM
      initialTranslations: initialTranslations,

      /// save locale changes to local storage
      // localeStorage: SharedPreferencesLocaleStorage(),

      /// save injected translations to local storage
      // translationsStorage: SharedPreferencesTranslationsStorage(),

      app: const MyApp(),
    ),
  );
}

Generating initial localizations from JSON or ARB files #

  1. Create at least one localization file (i.e. lib/l10n/en.json)
  2. run generate script flutter pub run im_localized:generate

Acknowledgments #

This library uses source code from the following projects:

Additional information #

Work in progress

License #

LICENSE

4
likes
50
points
67
downloads

Publisher

unverified uploader

Weekly Downloads

Flutter ICU compatible Localization library with support for JSONs, runtime parsing and injecting

Repository (GitHub)
View/report issues

License

BSD-3-Clause (license)

Dependencies

args, collection, flutter, flutter_localizations, intl, logger, path, shared_preferences

More

Packages that depend on im_localized