|Miguel N. 415be2e32b||2 months ago|
|LICENSE||2 months ago|
|README.md||2 months ago|
|jsonify.php||2 months ago|
Jsonify is a simple CLI command to turn word lists into JSON documents. It takes all lines in a text file, and turns them into JSON keys,
filling them with a placeholder string. After that, it writes the pretty-print'ed output to disk, so that you can begin translating it.
None, other than PHP7 installed in the system. JSONify doesn't use any fancy libraries. Just pure raw PHP.
Sometimes, you may have a list of strings that you need to translate, and the translation file needs to be in JSON. You can use this script to easily turn that string list into a JSON document, complete with placeholders so you don't have to place them manually.
For instance, the Laravel framework accepts translation files in JSON - it matches the keys in it with ktranslation calls in Blade templates.
sudo jsonify [/path/to/filename-to-jsonify.txt]
To install this, simply copy the script to the directory where binaries usually live:
sudo cp jsonify.php /usr/local/bin/jsonify
sudo chmod +x /usr/local/bin/jsonify
It hasn't been tested on Windows and probably won't work there. If you find any bugs, feel free to report them, or squash them yourself.