intl_converter 1.0.0 copy "intl_converter: ^1.0.0" to clipboard
intl_converter: ^1.0.0 copied to clipboard

A library tool that help you manager i18n strings in flutter, include convert from android "strings-xx.xml".

intl_converter #

A library tool that help you manager i18n strings in flutter,include convert from android "strings-xx.xml". Before to use,you need to know what is LocalizationsDelegate and what is intl_translation.

Flutter use arb file to manager i18n strings. some times you need to refactor an old android project use flutter.

intl_converter can help you convert android strings-xx.xml to flutter's arb file,and auto generate Dart class include all the strings define.You just need to extend the Dart class and registe with LocalizationsDelegate.

Flutter's internationalization reference: https://github.com/flutter/website/tree/master/examples/internationalization/intl_example/lib

Install #

dev_dependencies:
  intl_converter: version

Use build args #

--scan-dir the path where to scan android style strings-xx.xml files

--out-dir ARB and dart file output path

--gen-class the dart class name of auto generated

--file-name the dart file name of auto generated.default is:"strings_define.dart" (defaults to "strings_define.dart")

--dev-locale use which locale content to generate default dart class

build: flutter packages pub run intl_converter:build --scan-dir=xx --out-dir=yy --gen-class=zz

Use json config 'intl_converter.json' #

{
  "scan-dir": "assets/i18n",
  "out-dir": "lib/i18n/gen",
  "gen-class": "AppStringsDefine",
  "dev-locale": "zh"
}

build: flutter packages pub run intl_converter:build

0
likes
110
pub points
6%
popularity

Publisher

unverified uploader

A library tool that help you manager i18n strings in flutter, include convert from android "strings-xx.xml".

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

args, flutter, intl, intl_generator, path, xml

More

Packages that depend on intl_converter