Automated translation scripts for .po or .pot file.
Assuming you have generated a po or pot file from gettext or some other program.
Case I
- you treat msgid as original text
- you want to translate text from language A to language B
python main.py -s A -d B -f msgid -i pot_file -o po_file
Case II
- you treat msgstr as original text
- you want to translate text to all supported languages
python main.py -d all -f msgstr -i pot_file
Case III
- You don't have python installed, you just a translator looking for a dummy tool
- You use Windows
- Press
win
+r
and type "cmd" to open the command line -
cd /d potranslator_folder main.exe -d all -i pot_file
The project uses (only implements) Google translation engine by default. Please configure your network environment in translator/config.ini
before using it.
Q: How the translation part works
A: This project uses the translator from skywind3000. It simulates a browser sending a translation request to the Google translation engine. This implementation is reliable enough, lightweight, and more importantly, it's free.
Q: Which parts can be customized
A: Because the code is simple enough, you can modify almost everything. You can modify global variables to extend the supported formats of the program. You can also write the implementation of other translation engines yourself.