What is it?
Googtext is a small service that allows you to upload a gettext .PO file
(file describing strings in application and their translations in particular
language), and asks Google to translate it. Returned translations are then
saved to a new .PO file which you can download.
Is it any good?
Compared to any human translator, NO. This kind of hacked-up out-of-context
automated translation will hapilly produce utter nonsense. It is, however, good
to start with. I think it's easier to fix existing bad translation than start
from scratch.
How does it work?
A PHP script takes care of file uploading. Once it's on the server, a command-line
Python program is called, which parses the .PO file, takes out the original strings
and passes them to Google
Language API in batch mode, in several requests (101 strings per request). The
translated strings are inserted into .PO file as translations, and the file is saved
and downloaded. The entire process uses and produces UTF-8 encoded files.
Show me the source!
You can grab the source here. The PHP script, Python
googtext program and python-google-translate module
are under Public Domain, and you may use them as you see fit. To run this, you'll
need a recent Python installation (I'm using 2.5) with python-json (included in
Python 2.6) and polib modules.
You may also want to get Google API key if you plan to use this heavily.
Feedback
If you've experienced any problems with the service, want to report some error,
suggest improvement or just comment, thank or flame me, feel free to post a
comment on my blog or send me a message on
Twitter.
Created by Senko Rašić.