Translation of json file from source language to a target langauge using Google deep translation library in python.
- Clone the repository
git clone https://github.com/Ginohmk/json_file_lang_translator.git
- Cd into the folder
cd json_file_lang_translator
- To run test
python3 -m unittest test.py
.
├── data (holds json file)
│ ├── source.json
│
├── lib
│ ├── __pycache__.py
│ ├── translator.py
│
├── app.py
├── mock (For testing purpose)
│ ├── source.json
├── test.py
└── README.md
-
You need to place your source json file inside of data folder and name it source.json
-
Run the program
python3 app.py
-
Follow thw prompt
- Enter the abbreviation of the source language (For English en )
- Enter the abbreviation of the target language (For Spanish es)
-
Allow it to run the program, your output target json translation will be in the data folder, with the
bash <target abbrviation name>.json