flutter_localisation 1.0.1
flutter_localisation: ^1.0.1 copied to clipboard
A command-line tool for generating localization files for different flavors.
Flutter Localization Tool #
This project is a Dart-based localization tool tailored for Flutter Localization SaaS users. It handles ARB files and generates the corresponding Dart localization classes efficiently.
Installation #
- Clone the repository:
git clone https://github.com/your-repo/flutter-localisation.git
cd flutter-localisation
- Install Dart and Flutter dependencies:
dart pub get
flutter pub get
Usage #
Running the Localization Tool #
To generate localization files for a specific flavor, run the following command:
dart run bin/flutter_localisation.dart
Example:
dart run bin/flutter_localisation.dart lib/l10n test_flavor
Key Steps #
-
Create ARB Files:
Add localization ARB files in the relevant flavor folder (e.g.,lib/l10n/test_flavor/app_en.arb
). -
Ensure
flutter: generate: true
inpubspec.yaml
:
Add the following section in yourpubspec.yaml
:
flutter:
generate: true