Implemented in 4.4
Official Documentation Available
This topic is now covered in Content Translation Support module.
It was New Year's time, weather was awful and I was getting bored at home. Therefore I decided it was time to quickly integrate something into Magnolia. I pondered on it for a while and realized that we're always on the lookout for ways to simplify the process of translating/localizing contents stored in Magnolia. I also recalled that a few months ago I worked on integrating Google Spreadsheet and Google Translate services for localizing Magnolia UI. Finally it came to my mind that our recently released Magnolia Content Translation Support module uses xls and csv files to export/import translations and has a mechanism to easily implement and plug in new exporters/importers. So, the next logical step was to integrate Google Spreadsheet and its GoogleTranslate formula with our existing module.
How it works:
Go to Tools -> Content Translation and choose the Google Spreadsheet (CVS) option to export a website (or a subtree of it). In this case /demo-project/about
This will create a csv (comma separated value) file ready to leverage Google Spreadsheet and its GoogleTranslate formula. Upload this file into Google docs. Make sure to check the Convert documents, presentations, spreadsheets etc... option.
Let's have a look at the imported spreadsheet. As you can see the last colum (whose header is "de", after the locale enabled for the website we exported) has the English text (that is the fallback or default locale for that website) automatically translated.
Text translated by Google is marked by a small orange triangle on the cell's top right corner. It is interesting to notice that the exporter does not touch already localized texts. In our example the text "About" was already translated into "Ueber" when we did the export, therefore did not undergo the automatic translation process. This is also recognizable by the fact that the small triangle is not present on the cell.
Now, all this magic has a downside: the automatically translated text cannot be edited. This is unfortunately so for the time being. I did not inquiry into the Google Premium Account: it is possible that it has no such limitation.
However, we can work around this. We can save the file as a csv or xls and import it back into Google Docs by choosing to replace the existing file. This time the imported file will have no editing limitations and, in case of need, human translators will be able to revise and eventually fix the automated translation.
When we're done with our translation, we can import it back to Magnolia.
And that's the final result for the German site (Click the thumbnail to enlarge it). Whereas before where no translated counterpart existed we had texts falling back to English, now all contents under /demo-project/about are localized into German.
One can have multiple locales automatically translated. Here is a sample Google Spreadsheet for de and zh_CN (Simplified Chinese). Having multiple locales is just a matter of enabling them in the site definition.
And finally, we got our demo-project site in Chinese in just a few minutes. (I put the screenshot here only because it looks cool, regardless of whether the automated translation makes sense or not).