hueitan / I18n Generator
i18n json files generator for node, web browser and command line
Stars: ✭ 60
Programming Languages
javascript
184084 projects - #8 most used programming language
Projects that are alternatives of or similar to I18n Generator
Dataset Serialize
JSON to DataSet and DataSet to JSON converter for Delphi and Lazarus (FPC)
Stars: ✭ 213 (+255%)
Mutual labels: json, converter
Jet
CLI to transform between JSON, EDN and Transit, powered with a minimal query language.
Stars: ✭ 331 (+451.67%)
Mutual labels: json, converter
Retrofit Logansquare
A Converter implementation using LoganSquare JSON serialization for Retrofit 2.
Stars: ✭ 224 (+273.33%)
Mutual labels: json, converter
Node Js2xmlparser
Popular Node.js module for parsing JavaScript objects into XML
Stars: ✭ 171 (+185%)
Mutual labels: json, converter
Sqlitebiter
A CLI tool to convert CSV / Excel / HTML / JSON / Jupyter Notebook / LDJSON / LTSV / Markdown / SQLite / SSV / TSV / Google-Sheets to a SQLite database file.
Stars: ✭ 601 (+901.67%)
Mutual labels: json, converter
Swagger Toolbox
💡 Swagger schema model (in yaml, json) generator from json data
Stars: ✭ 194 (+223.33%)
Mutual labels: json, converter
I18n Editor
GUI for editing your i18n translation files
Stars: ✭ 290 (+383.33%)
Mutual labels: json, i18n
Json Node Normalizer
'json-node-normalizer' - NodeJS module that normalize json data types from json schema specifications.
Stars: ✭ 105 (+75%)
Mutual labels: json, converter
Remarshal
Convert between CBOR, JSON, MessagePack, TOML, and YAML
Stars: ✭ 421 (+601.67%)
Mutual labels: json, converter
Easy localization
Easy and Fast internationalizing your Flutter Apps
Stars: ✭ 407 (+578.33%)
Mutual labels: json, i18n
Goxml2json
XML to JSON converter written in Go (no schema, no structs)
Stars: ✭ 170 (+183.33%)
Mutual labels: json, converter
Jsontocodable
A generating tool from Raw JSON to Codable (Swift4) text written in Swift4.
Stars: ✭ 33 (-45%)
Mutual labels: json, converter
Gelatin
Transform text files to XML, JSON, or YAML
Stars: ✭ 150 (+150%)
Mutual labels: json, converter
Jsonsubtypes
Discriminated Json Subtypes Converter implementation for .NET
Stars: ✭ 201 (+235%)
Mutual labels: json, converter
Perun
A command-line validation tool for AWS Cloud Formation that allows to conquer the cloud faster!
Stars: ✭ 82 (+36.67%)
Mutual labels: json, converter
Eslint Plugin I18n Json
Fully extendable eslint plugin for JSON i18n translation files.
Stars: ✭ 101 (+68.33%)
Mutual labels: json, i18n
i18n-generator
i18n json files generator for node, web browser and command line.
i18n Online Demo Tools / Edit Demo CSV File
Getting Started
node.js
Install the module with: npm install i18n-generator
const i18nGenerator = require('i18n-generator');
const inputFile = 'input.txt';
const outputPath = 'output';
i18nGenerator(inputFile, outputPath);
// js-beautify your json
i18nGenerator(inputFile, outputPath, true);
// or given js-beautify options
i18nGenerator(inputFile, outputPath, { indent_size: 2 });
// settings split variable (default as |)
i18nGenerator(inputFile,outputPath, options, 'csv');
// options => https://github.com/beautify-web/js-beautify#options
// splitter support
// | => pipe (default)
// , => csv
// \t => tsv
// get output data api
// input can be file (.txt) or string (data)
i18nGenerator.get(input, 'csv', (err, data) => {
console.log(data);
// => output i18n data
});
// or you can
i18nGenerator.get(input, (err, data) => {
console.log(data);
});
browser
<script src="i18n-generator.js"></script>
const { i18n } = window;
i18n(inputData, 'csv', (err, data) => {
console.log(data);
// => output i18n data
});
// or easily
i18n(inputData, (err, data) => {
console.log(data);
// => split default pipe |
});
cli
$ i18n input.txt output
# generate from csv or tsv
$ i18n input.csv output
# watch file
$ i18n input.txt output --watch
Workflow
input file
i18n=>, en, zh_TW, de, my
you, you, 你, Du, kamu
I, I, 我, ich, Saya
love, love, 喜歡, liebe, cinta
eat, eat, 吃, essen, makan
ilovegithub, i love github, 我愛 Github, ich liebe Github, Saya cinta pada Github
output (de.json)
{"you":"Du","I":"ich","love":"liebe","eat":"essen","ilovegithub":"ich liebe Github"}
output (en.json)
{"you":"you","I":"I","love":"love","eat":"eat","ilovegithub":"i love github"}
output (my.json)
{"you":"kamu","I":"Saya","love":"cinta","eat":"makan","ilovegithub":"Saya cinta pada Github"}
output (zh_TW.json)
{"you":"你","I":"我","love":"喜歡","eat":"吃","ilovegithub":"我愛 Github"}
Try Advance
When the sentence includes splitter
i18n=>, en, zh_TW, de, my
ilovegithub, "i love github but u", "我愛 github,但我也愛 git", was du gesagt, "saya pun"
Try Nest
i18n-generator covers the nesting, use =>
to open, <=
to close
i18n=>, en, zh_TW, de, my
ilovegithub, i love github, 我愛 Github, ich liebe Github, Saya cinta pada Github
=> global
sleep, sleep, 睡覺, schlafen, tidur
morning, morning, 早安, Morgen, pagi
=> people
Ahmad, Ahmad, Ahmad, Ahmad, Ahmad
<=
Back, back, 回來, terug, balik
It's work! Cool right ? You can try it on online demo tools
License
Copyright (c) 2014-Present Huei Tan. Licensed under the MIT license.
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].