-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Write script for CSV to JSON in other programming languages #3
Comments
hey @thealphadollar I wonder if you you check #5 PR? |
@toyamarodrigo Hey, I'm a bit busy over the week and will be looking at it as soon as I get time. I'm really thankful for your contribution and patience :D |
Co-authored-by: Shivam Kumar Jha <shivam.cs.iit.kgp@gmail.com>
Can I work on this issue? |
Yes, please. Please let me know what language are you going to write the script for. |
I'm writing the script in JavaScript. |
Hey Neeraj! I appreciate your interest. We already have the NodeJS script. You can use it as a reference and prepare a JS script that is completely runnable in a browser. Please also let me know if you research and find out the same is not possible. |
I mistook the NodeJS script for JS. I've edited my comment. Apologies. |
Ok I will research on this :) What are the other languages that I can use for writting the script. |
Any language is fine - GoLang, Rust, Php, etc. Wherever it is possible should be a good language. |
I'm working in a JS version runnable in the browser. Currently, it works perfectly. This is the example of the usage: const CSV_CONFIG = {
double_quotationmark: true,
lastbeggin_quotationmark: true,
delimiter: ",",
breakline: "\r\n"
}
var csvParser = new csv2vi18n(myCsvText, CSV_CONFIG);
csvParser.languages // Array of available languages
csvParser.getLanguageObject("Enlgish"); // Return Object of language if exists
csvParser.getSingleLanguageJson("Enlgish"); // Download JSON file of language
csvParser.downloadZip(); // Download all languages in Zip file
/*
File structure of zip file:
vanilla-i18n
├── English.json
├── français.json
└── हिन्दी.json
*/ It needs the <!-- <script src="./jquery.csv.min.js"></script>. //Not yet -->
<script src="./jszip.min.js"></script>
<script src="./csv_to_vanilla_i18.browser.js"></script> The reason why I didn't open a PR yet is because I don't know how to serve that. We should deploy it in the gh-pages? You can check my implementation here in my fork, you need to pull it to your local repo and open the HTML file in your browser with My repo added a lot of code, but the script is just in this file, the others are for an HTML deploy.
|
Ah! Looks amazing.
Yes, that would be best. |
Currently, the script to convert the language CSV to multiple language JSON files is written in Python3. This poses an issue of installing Python3 for web developers who want to use the library for providing internationalization.
The script should be ported to the following languages for ease of usage:
An enhanced version of the same would be developing a tiny webpage that takes the CSV as input and provides the JSON for the corresponding languages.
The text was updated successfully, but these errors were encountered: