https://github.com/leechy/i18n-to-csv
Simple tool to convert React Intl source files to CSV and vice versa
https://github.com/leechy/i18n-to-csv
Last synced: 10 months ago
JSON representation
Simple tool to convert React Intl source files to CSV and vice versa
- Host: GitHub
- URL: https://github.com/leechy/i18n-to-csv
- Owner: leechy
- Created: 2022-07-30T16:22:39.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2022-08-01T10:45:02.000Z (almost 4 years ago)
- Last Synced: 2025-02-28T00:57:05.357Z (over 1 year ago)
- Language: JavaScript
- Size: 12.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# i18n-to-csv
Small CLI script that converts the source files for all languages in the React Intl translations format to one CSV containing all the languages, and also can convert everythng back to separate language JSON files.
## Installation
There is no need for an istallation. Just run the script from this folder:
```
$ node bin/i18n-to-csv
```
If you want to make it available globally in the system you can make a link and then use it by it's name:
```
$ npm link
$ i18n-to-csv
```
## Arguments
--help Help text describing the folllowing arguments
### Converting JSON-files to CSV
If --src param is a folderm then the conversion is JSON->CSV
--src Path to folder, where the JSON-files are located. When available the JSON is converted to CSV. `langs` by default
--target name of the CSV-file with the results. `langs.csv` by default
### Converting CSV to JSON-files
If --src param is ponting at file, then the conversion is CSV->JSON
--src name of the CSV-file to be converted to JSON.
--target Path to folder where all the JSON-files will be saved. `langs` by default