python command line tool to translate multiple files with Google translate
Want to be able to feed directories of text files to the script and have it save the translated versions in a directory.
Uses goslate by Zhuo Qiang for the heavylifting.
python translate.py ru en -i inputDir -o outputDir -x py
to translate all .py
files in inputDir
from Russian to English and put the
translated files in outputDir
.
Add the -v
optional flag to output status for each file being processed.
- Support both directory and file(s) as input
- Automatically detect source language
- Support Bash 4's globstar globbing
- Automatically detect encoding