april_json_translator 0.1.1 copy "april_json_translator: ^0.1.1" to clipboard
april_json_translator: ^0.1.1 copied to clipboard

outdated

A tool that can translate json files from one language to another.

Getting started #

Run flutter pub global activate april_json_translator in project Terminal for activate this tool.

Usage #

  1. Add this in your project pubspec.yaml with top level.
april_json_translator:
  source_code: 'en'
  target_codes: 'zh'
  source_file_path: 'lib/l10n/intl_en.arb'
  file_prefix: 'intl_'
  file_suffix: '.arb'
  1. Run flutter pub global run april_json_translator:generate in project Terminal for translate your json file with this tool.

  • In the above example, en and zh are both the code of the language to be translated and the mid-segment name of the file.After you have finished translating, the file name will be "intl_zh.arb".
  • You can set like target_codes: 'he:iw' when language code is not the same as your mid-segment name of file.Then the file name will be "intl_he.arb", and iw will be used for translate.
  • If you need to translate into multiple languages, you can set like this target_codes: 'zh:zh-CN,ja,ko' just separate the language codes with ,
  • It will be never translate when the json key is start with _ or @ and never translate when the source key\value is not string.
  • The source json key will be remove from result json when translate failed.
0
likes
0
points
110
downloads

Publisher

unverified uploader

Weekly Downloads

A tool that can translate json files from one language to another.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

html, path, yaml

More

Packages that depend on april_json_translator