Skip to content

Repository files navigation

Custom assets loaders for Easy Localization package

Pub VersionCode Climate issuesGitHub closed issuesGitHub contributorsGitHub repo sizeGitHub forksGitHub stars

CodeFactor GradeGitHub license

Supported formats

  • JSON (JsonAssetLoader)
  • CSV (CsvAssetLoader)
  • HTTP (HttpAssetLoader)
  • XML (XmlAssetLoader, XmlSingleAssetLoader)
  • Yaml (YamlAssetLoader, YamlSingleAssetLoader)
  • FILE (FileAssetLoader)

Configuration

  1. Add this to your package's pubspec.yaml file:
dependencies:
#Easy Localization main packageeasy_localization: <last_version># stable version install from https://pub.dev/packageseasy_localization_loader: <last_version># Dev version install from git REPOeasy_localization_loader:
git: https://github.com/aissat/easy_localization_loader.git
  1. Change assetLoader and path
...
voidmain(){
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

About

custom assets loaders for easy_localization

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages