Search packages, repositories and app categories

Package detailsv2.0.2

easy_localization_loader

Easy Localization Loader custom assets loaders for easy_localization (Json, CSV, http, Xml, API ...)

AndroidiOSmacOSWindowsLinux
30-day downloads
20.3K
Likes
73
Pub points
90

Install package

flutter pub add easy_localization_loader

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

Easy Localization Loader extends the easy_localization package by providing custom asset loaders for various formats such as JSON, CSV, XML, and HTTP sources. It enables developers to load localization files from diverse origins, including remote APIs and local assets, streamlining internationalization workflows. The package integrates seamlessly with easy_localization, offering flexibility in managing translations across platforms. Ideal for apps requiring dynamic or externalized translation data, it supports Android, iOS, macOS, Windows, and Linux.

Use cases

  • Loading translations from remote APIs
  • Supporting multiple file formats like JSON and CSV
  • Dynamic localization updates
  • Integrating with existing easy_localization setup
  • Handling XML-based translation files

Key features

  • Custom asset loaders for multiple formats
  • Remote and local file support
  • Seamless integration with easy_localization
  • Cross-platform compatibility
  • Extensible architecture

Suitable for

  • Apps needing dynamic translations
  • Developers using easy_localization
  • Projects with non-standard localization sources
  • Teams managing large translation sets
  • Multi-platform applications

Considerations

  • Requires easy_localization to be installed
  • Network requests may impact performance
  • File format validation needed for custom loaders
  • Limited documentation beyond basic usage
  • Potential complexity with nested or complex data structures

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

Custom assets loaders for Easy Localization package

Pub Version Code Climate issues GitHub closed issues GitHub contributors GitHub repo size GitHub forks GitHub stars

CodeFactor Grade GitHub license

Supported formats
  • [x] JSON (JsonAssetLoader)
  • [x] CSV (CsvAssetLoader)
  • [x] HTTP (HttpAssetLoader)
  • [x] XML (XmlAssetLoader, XmlSingleAssetLoader)
  • [x] Yaml (YamlAssetLoader, YamlSingleAssetLoader)
  • [x] FILE (FileAssetLoader)
Configuration
  1. Add this to your package's pubspec.yaml file:
dependencies:
  #Easy Localization main package
  easy_localization: <last_version>

    # stable version install from https://pub.dev/packages
  easy_localization_loader: <last_version>

  # Dev version install from git REPO
  easy_localization_loader:
    git: https://github.com/aissat/easy_localization_loader.git

  1. Change assetLoader and path
...
void main(){
  runApp(EasyLocalization(
    child: MyApp(),
    supportedLocales: [Locale('en', 'US'), Locale('ar', 'DZ')],
    path: 'resources/langs/langs.csv',
    assetLoader: CsvAssetLoader()
  ));
}
...
  1. All done!.
Loaders Specification
HttpAssetLoader

In order to use HttpAssetLoader you must provide a path to a folder (i.e. base path) where all your translations are placed like https://example.com/translations

Your translations should be created as separate files with .json extension. Placing translations as individual files reduces the size of the file to load on application init. Example:

translations/
├── en-US.json
└── uk-UA.json

Categories

Dependencies

Dependency list 7 items

Source repository

Projects using this package