Qt linguist & google translate

I am looking for a way to trick and create very rough translations of my Qt application using Qt linguist and an existing translation service like google translate.

There is a public API for translating Google, so I hope someone already tried this, but I can not find it. Has anyone seen anything like this before?

I do not expect brilliant translations - at this stage it is simply shown as proof of concept.

+7
c ++ qt translation
source share
5 answers

I wrote an open source application to do this with gettext.po files, for Qt Linguist files it's easy to change. Demo and php source are available at http://pepipopum.dixo.net

+4
source share

You can use lconvert to convert files to .po

lconvert -if ts -of po -o myFile.po myfile.ts 

Then run them through the translator Paul Dixon, and then convert them again using lconvert .

 lconvert -if po -of ts -o myFile.ts myfile.po 
+2
source share

I have not seen anything like this before (probably because automatic translation is likely to produce less than stellar results), but it should not be too difficult to implement.

The .ts files created by the lupdate tool are actually just XML files (and not even that complicated), just open it in a text editor and see for yourself). Therefore, you can use various XML tools / libraries to edit the <translation> elements in the file. Qt even comes with one .

+1
source share

Yes it is possible; and actually not at all difficult!

I wrote a C ++ api before using the Google Translate Ajax Javascript API (this is the only existing Google Translate API) using libCURL to do rough translations for an unfinished game.

Since Qt linguist uses XML files according to the person mentioned above, it should be easy to translate and write to a valid XML file!

0
source share

see http://omegat.org

it integrates Google translation, automatic dictionary search, translation memory and more.

OmegaT reads and writes many formats, including .po and Open Office (XML flavor). Not sure about the general XML, but there are tools like xml2po.

0
source share

All Articles