json_to_arb 0.2.1 copy "json_to_arb: ^0.2.1" to clipboard
json_to_arb: ^0.2.1 copied to clipboard

Convert modular JSON localization files into Flutter ARB files with nested folder support.

example/example.dart

// example/example.dart
//
// json_to_arb is a CLI-first tool: its configuration (source, output,
// locales) is read from `json_to_arb.yaml` or a `json_to_arb:` section in
// `pubspec.yaml` in the current working directory — not from arguments
// passed here. This example simply forwards CLI args to the package's
// entry point, exactly like the `bin/json_to_arb.dart` executable does.
//
// To run it, do so from a project root that already has:
//   1. A `json_to_arb` config (source/output/locales), and
//   2. JSON translation files under `source`, one subfolder per locale.
//
// See the README's "Configuration" and "Usage" sections for the full
// folder layout this expects.
//
// Run a single conversion:
//   dart run example/example.dart
//
// Run in watch mode (regenerates ARB files whenever a source JSON changes):
//   dart run example/example.dart --watch

import 'package:json_to_arb/json_to_arb.dart' as json_to_arb;

void main(List<String> arguments) {
  json_to_arb.main(arguments);
}
0
likes
160
points
192
downloads

Documentation

API reference

Publisher

verified publisherkaramdev.me

Weekly Downloads

Convert modular JSON localization files into Flutter ARB files with nested folder support.

Repository (GitHub)
View/report issues

Topics

#flutter #localization #arb #i18n #l10n

License

MIT (license)

Dependencies

flutter, watcher, yaml

More

Packages that depend on json_to_arb