resx_to_json 0.0.1 icon indicating copy to clipboard operation
resx_to_json: ^0.0.1 copied to clipboard

SDKDart

Helps you to convert RESX files to JSON. You would want to use it during migration from Xamarin to Flutter.

RESX to JSON converter.

While migration from Xamarin Forms to Flutter, you'd probably want to convert your localization files to json. This package is the perfect tool for it.

Note: For different extensions (like .arb) change the extension option in your pubspec.yaml file. See Usage

Installation #

You don't have to add any dependency to your project. Just activate resx_to_json globally:

pub global activate resx_to_json

Usage #

  1. Add a new section resx_to_json to your pubspec.yaml file.

An example with all options:

resx_to_json:
  # The directory containing resx files. The path can be relative or absolute.
  source: C:\Users\Mazlum\source\repos\_MergeSoft\AsoGotin\AsoGotin\Properties
  
  # The directory where the generated json files will be saved in. The path can be relative or absolute.
  destination: assets/localization/

  # Indicates whether the keys in json files should be sorted alphabetically. (Optional, default: true)
  sort: true

  # The extension for the generated json files. For example `arb`. (Optional, default: 'json')
  extension: json

  # Regex patterns for renaming resx files. (Optional)
  # Notice that the search is case-sensitive
  # <regex_pattern> => <replacement> 
  replacements: 
    - Resources\.resx => en.json
    - Resources\.([a-z]+)\.resx => $1.json # $1 is the 1. match group. e.g. Resources.de.resx is renamed to de.json
  1. Run this command inside your flutter project root.
pub global run resx_to_json
0
likes
80
pub points
0%
popularity

Publisher

verified publisher iconmergesoft.dev

Helps you to convert RESX files to JSON. You would want to use it during migration from Xamarin to Flutter.

Repository (GitHub)
View/report issues

Documentation

API reference

License

Icon for licenses.MIT (LICENSE)

Dependencies

xml, yaml

More

Packages that depend on resx_to_json