From Babel to Babble

Free Speech Debate web developer Simon Dickson describes the new open source code developed for our – or any other – multi-language Word Press site.

Perhaps we should have read the warning signs. The Free Speech Debate team wanted to draft a set of ground rules for global free expression. To stay true to the project’s aims, we had to deliver a website which enabled people from around the world to contribute to that debate. This meant facing questions which few web developers ever have to confront.

Free Speech Debate is built on WordPress, an open-source publishing platform available in over 100 languages. These days it’s relatively straightforward to install WordPress, download a number of additional language packs, and run a number of different sites all speaking different languages.

‘Multilingual publishing’ implies something more than that. It implies that at least some content is available in more than one language, and that there are links between equivalent pages across the various sites. However there are many ways you could approach this. We had to start with some editorial decisions.

With Free Speech Debate, we decided to treat English as the default or canonical language for the site, with our team of translators producing direct translations of most pages. We wanted to make life easier for the translators by centralising the management of ‘metadata’ – such as the date of publication, attribution and the choice of a featured image, categories or keyword tags. We also wanted to unify the comment threads across equivalent pages, allowing readers to interact with each other across language barriers.

There are numerous off-the-shelf solutions for multilingual publishing with WordPress: we considered them all, but saw weaknesses with each one. So we set about writing our own, based on the most up-to-date methods and coding standards. And in keeping with the aims of the project, we pledged to release our work under the same open-source terms as WordPress itself.

It took longer than we hoped, but by October 2013 we were finally ready to announce the availability of our code framework, which we called Babble, to the world.

Like many open source projects, Babble lives on the Github website. Anyone can view the code, download it, and use it to build their own website. They can report any problems they encounter when using it, and suggest features they’d like to see added to it.

But most helpfully, if they are technically inclined, they can submit code to fix said problems, or add said features. Within a few days of making the announcement, we had already received an encouraging number of third-party contributions.

Storing the information in the ‘back end’ was one challenge, presenting it on the ‘front end’ was quite another. Although the system’s default language was English, we wanted the site to feel ‘native’ to any user, no matter what language he or she chose to view it in. Everything had to be translated or translatable. We would have to work with multiple scripts, not just the Latin-based character sets of Western Europe.

Russian and Japanese were unexpectedly straightforward; even Hindi and Chinese came together fairly easily. But things took a very different turn, literally, when we tackled the right-to-left scripts of Arabic, Persian and Urdu.

We suddenly became aware of how instinctive left-to-right thinking was to us. We had to review every reference to text or image alignment in our output stylesheets, and every definition of margin and padding on an element to make it direction-agnostic. We had to remake numerous graphics, from our logo to our stylized quotation marks.

Some problems would be easy to diagnose: it would be pretty clear if something was left-aligning when it should be right-aligning. But how could we know if the languages we didn’t speak, in scripts we couldn’t begin to decipher, were coming out as intended by the translator – or as complete gibberish?

We could take nothing for granted. Every line of code had to be reviewed for possible problems in any of the 13 languages; and even if we spotted something, we couldn’t say for sure that we’d fixed it. It became quite draining – for us and, I’m sure, for the team of Free Speech Debate translators who supported us.

But it still brings a smile to my face when I switch from English to Arabic, and see the entire site flip horizontally; or when I see people engaging with each other in the comment threads, despite not speaking the same language.

And if our release of the Babble code helps others develop their own multilingual websites, for whatever purpose, we will be delighted. It will stand as a representation of the free speech principles which the project sought to explore.

Simon Dickson is co-founder of Code For The People Ltd, the web development team behind Free Speech Debate. He is a former journalist and civil servant, now better known as one of the UK’s leading WordPress specialists.

Leave a comment in any language

Highlights

Swipe left to browse all of the highlights.


Free Speech Debate is a research project of the Dahrendorf Programme for the Study of Freedom at St Antony's College in the University of Oxford. www.freespeechdebate.ox.ac.uk

The University of Oxford