string_extractor_intl 1.0.4
string_extractor_intl: ^1.0.4 copied to clipboard
A Flutter package that extracts hardcoded strings and generates .arb files from Dart files or lib directory for use in internationalization (i18n).
Use this package as an executable
Install it
You can install the package from the command line:
dart pub global activate string_extractor_intl
Use it
The package has the following executables:
$ extract_strings
Use this package as a library
Depend on it
Run this command:
With Flutter:
$ flutter pub add string_extractor_intl
This will add a line like this to your package's pubspec.yaml (and run an implicit flutter pub get
):
dependencies:
string_extractor_intl: ^1.0.4
Alternatively, your editor might support flutter pub get
. Check the docs for your editor to learn more.
Import it
Now in your Dart code, you can use:
import 'package:string_extractor_intl/string_extractor_intl.dart';