Tower of Babel, Tower of Google: The ultimate hack for managing translations
Tomasz SurowiecSenior PHP Developer
When you develop software for the global market, you quite often end up working with the languages you don’t understand. Sometimes, you cannot even tell the difference between two words without playing “spot the difference” game. In this situation, you have to rely on the client’s active contribution. And on translation management tools.
Please, not another tool…
There are plenty of solutions which can help you manage the translations. Most of them are very flexible, robust, able to deal with hundreds of languages. It, however, introduces another tool in the stack which you need to get familiar with, another set of logins for both the team and the client and, of course, additional cost. Many tools can also overwhelm you with their features (especially when the UI is not that good) or, even worse, overwhelm your clients.
But there is one tool which all the business users are very comfortable with – a spreadsheet. Combine this with the collaboration features of Google Suite and you get an almost perfect solution for small to medium projects.
Spreadsheets + translations = BabelSheet
This was our exact plan: to take Google Sheets and try to create a translation management tool based upon it. But how to do it? We started with the description of syntax – first column contains tags, then there are columns holding key hierarchy and finally one column for every language. Tags and keys are protected so only the dev team has access to it – previously, when given the translation files, clients would often break the syntax of XML or JSON.
What started as a small script parsing the spreadsheets, soon turned into a fully-fledged solution with its own JSON configuration file syntax and multiple supported formats. We have also created a docker image which does the parsing and generates a file from within the container and hence can be integrated with CI. The whole tool was called BabelSheet. You get the joke, don’t you?
For the team, for the clients
As a result, you get a tool that creates the spreadsheet for you. You can share the spreadsheet with all the parties involved, using built-in Google Apps collaboration features. In the config, you can define what format do you want: BableSheet is currently supporting JSON, XLIFF, iOS and Android text files, but thanks to plugin architecture any other desired format can be easily introduced. You can also decide if you want to generate one big file or do you want to split the translation into multiple files using either tags or sections. It’s a one-liner that can be executed on local machine or during a CI build.
Probably the most important thing about BabelSheet is that it’s very intuitive both for your team and for your clients. It makes the collaboration super easy, so you can wrap up the translations faster than with the more complicated tools – making sure that what happened to the Babel Tower won’t repeat in your project. 😉