Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aissat/easy_localization_loader
custom assets loaders for easy_localization
https://github.com/aissat/easy_localization_loader
api assets csv customization-assetloader dart flutter http i18 i18n i18n-alternative json loader locales locales-translation localization localization-tool translation
Last synced: 6 days ago
JSON representation
custom assets loaders for easy_localization
- Host: GitHub
- URL: https://github.com/aissat/easy_localization_loader
- Owner: aissat
- License: mit
- Created: 2020-04-18T11:46:52.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2024-12-04T19:36:35.000Z (about 2 months ago)
- Last Synced: 2025-01-19T06:17:53.558Z (13 days ago)
- Topics: api, assets, csv, customization-assetloader, dart, flutter, http, i18, i18n, i18n-alternative, json, loader, locales, locales-translation, localization, localization-tool, translation
- Language: Dart
- Homepage: https://pub.dev/packages/easy_localization_loader
- Size: 43 KB
- Stars: 62
- Watchers: 5
- Forks: 82
- Open Issues: 25
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
## Custom assets loaders for [Easy Localization](https://github.com/aissat/easy_localization) package
![Pub Version](https://img.shields.io/pub/v/easy_localization_loader?style=flat-square)
![Code Climate issues](https://img.shields.io/github/issues/aissat/easy_localization_loader?style=flat-square)
![GitHub closed issues](https://img.shields.io/github/issues-closed/aissat/easy_localization_loader?style=flat-square)
![GitHub contributors](https://img.shields.io/github/contributors/aissat/easy_localization_loader?style=flat-square)
![GitHub repo size](https://img.shields.io/github/repo-size/aissat/easy_localization_loader?style=flat-square)
![GitHub forks](https://img.shields.io/github/forks/aissat/easy_localization_loader?style=flat-square)
![GitHub stars](https://img.shields.io/github/stars/aissat/easy_localization_loader?style=flat-square)![CodeFactor Grade](https://img.shields.io/codefactor/grade/github/aissat/easy_localization_loader?style=flat-square)
![GitHub license](https://img.shields.io/github/license/aissat/easy_localization_loader?style=flat-square)### 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:
```yaml
dependencies:
#Easy Localization main package
easy_localization:# stable version install from https://pub.dev/packages
easy_localization_loader:# Dev version install from git REPO
easy_localization_loader:
git: https://github.com/aissat/easy_localization_loader.git```
2. Change assetLoader and path
```dart
...
void main(){
runApp(EasyLocalization(
child: MyApp(),
supportedLocales: [Locale('en', 'US'), Locale('ar', 'DZ')],
path: 'resources/langs/langs.csv',
assetLoader: CsvAssetLoader()
));
}
...
```3. 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
```