icapps_translations 0.1.1 icapps_translations: ^0.1.1 copied to clipboard
Dart tool to generate flutter translations code from the icapps translations tool
flutter icapps translations #
A dart package to automaticly download translations from the icapps translation tool.
This repo contains an example how to use this package.
Packages used:
- flutter_localizations
- shared_preferences
- provider
- kiwi
- icapps_translations
Example #
Setup #
Add dependency to pubspec #
dev-dependencies:
icapps_translations: <latest-version>
Add config to pubspec #
Add your locale folder to the assets to make use all your translations are loaded.
flutter:
assets:
- assets/locale/
Add the icapps_translations config to fetch the latest translations
icapps_translations:
api_key: 'enter-your-api-key'
default_language: 'nl'
languages: ['en', 'nl']
set an env variable for your api_key
API_KEY_ICAPPS_TRANSLATIONS
Run package with Flutter #
flutter packages pub run icapps_translations
Run package with Dart #
pub run icapps_translations