Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pascholda1/vue-cli-plugin-i18n-csv-exchange
Vue CLI plugin to convert i18n localizations from JSON to CSV / CSV to JSON
https://github.com/pascholda1/vue-cli-plugin-i18n-csv-exchange
i18n plugin vuecli vuejs2
Last synced: 17 days ago
JSON representation
Vue CLI plugin to convert i18n localizations from JSON to CSV / CSV to JSON
- Host: GitHub
- URL: https://github.com/pascholda1/vue-cli-plugin-i18n-csv-exchange
- Owner: pascholda1
- License: mit
- Created: 2023-02-22T02:13:30.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2023-02-22T22:41:11.000Z (over 1 year ago)
- Last Synced: 2024-10-16T12:13:21.743Z (about 1 month ago)
- Topics: i18n, plugin, vuecli, vuejs2
- Language: JavaScript
- Homepage:
- Size: 8.79 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Vue CLI Plugin i18n CSV exchange
This plugin can export nested localization JSON files to CSV and import CSV localization files back to JSON.
## Installation
````shell
npm i --save-dev @pascholda1/vue-cli-plugin-i18n-csv-exchange
vue invoke vue-cli-plugin-i18n-csv-exchange
````## Usage
To create / update CSV files based on your JSON files:
````shell
npm run i18n-export-csv
````To create / update JSON files based on your CSV files:
````shell
npm run i18n-import-csv
````## Examples
### i18n-export-csv
reads nested JSON Files like:
`````json
{
"questions": {
"answer": {
"yes": "Yes",
"no": "No"
}
}
}
`````will create a CSV like:
```csv
questions.answer.yes,Yes
questions.answer.no ,No
```### i18n-import-csv
reads a CSV File like that:
```csv
questions.answer.yes,Yes
questions.answer.no ,No
```and adds the second column's values to the first column's object path.