l10n_gen 1.0.0+1
l10n_gen: ^1.0.0+1 copied to clipboard
Generates Dart localization files from JSON, making them easier to work with leveraging Dart's type system.
Use this package as an executable
Install it
You can install the package from the command line:
dart pub global activate l10n_genUse it
The package has the following executables:
$ l10n_gen
Use this package as a library
Depend on it
Run this command:
With Dart:
$ dart pub add l10n_genWith Flutter:
$ flutter pub add l10n_genThis will add a line like this to your package's pubspec.yaml (and run an implicit dart pub get):
dependencies:
l10n_gen: ^1.0.0+1Alternatively, your editor might support dart pub get or flutter pub get. Check the docs for your editor to learn more.
Import it
Now in your Dart code, you can use:
import 'package:l10n_gen/config.dart';
import 'package:l10n_gen/generator.dart';
import 'package:l10n_gen/l10_gen.dart';
import 'package:l10n_gen/models.dart';
import 'package:l10n_gen/processor.dart';
import 'package:l10n_gen/utils.dart';