Localizing DuckTypen to Polish

Elements authors
Elements blog
Published in
3 min readApr 22, 2015

Author: Jakub Bożanowski

Last week we achieved an important milestone by releasing the Polish version of DuckTypen, the most fun touch typing course for children, together with our client Sanoma and the Polish publisher, Nowa Era. The Polish site’s name is Kaczor Donald Reporter and it can be found under the URL https://www.donaldreporter.pl.

In today’s global world making the site speak multiple languages is often indispensable, helping reach new users and new markets. But with the benefits it often provides ample challenges of its own, especially when adapting an app to a language as notoriously difficult as Polish.

One of the least obvious and most non-standard features of the Polish language — especially when compared to western languages — is the plural system. In English, plurals are trivial — you just append “s” to a noun if there’s more than one item and you’re done. In contrast, the Polish language has two plural forms that depend on the number of items — in our case it was the number of touch typing courses. A course in Polish is “kurs” and for 2 courses it’s “2 kursy”. This is however only true for numbers ending in 2, 3 and 4 — for others the plural form is “kursów”, with the exception of numbers 5–21, where it’s always “kursów”. So “22 kursy”, “34 kursy” but “55 kursów”, and so on. Phew!

The good news is that the standard gettext package, ubiquitously used for translating projects, supports this feature out of the box (and Polish is not the only plural-challenging language out there!). The bad news, however, is that Rosetta — one of the most popular translation management system for Django-powered sites — doesn’t seem to support it. It just presents the translator with the singular and plural translation, which is obviously not enough for Polish! Fortunately, it turns out this is just a visual rough edge of Rosetta and once you get down and dirty with the source translation files for gettext and add the second plural form, it not only appears translated on the site, but also suddenly appears in Rosetta web interface for any subsequent editing, should it become necessary.

DuckTypen becoming Kaczor Donald Reporter was much more than just language translation, however. We also had to support a different online payment gateway, a different currency (Poland has been a member of the European Union since 2004 but is not yet part of the Eurozone), a separate backend financial system connection and a new mailing solution, among other things. We didn’t want to fork the project and maintain separate codebases, so all of the solutions needed to be integrated together with existing Dutch features. We accomplished that by creating top-level wrappers with drivers for site-specific modules, so not only is the code cleaner, but it’s also ready for expansion into other countries.

It was also a good chance to work out some of the long-standing bugs and idiosyncrasies of the project’s codebase, like the legacy and Dutch-specific user storage and authentication system, which we successfully replaced with a more robust and better scalable native Django solution. This of course benefited not only the Polish implementation but the Dutch site as well. The accompanying user migration initially seemed like a daunting task not just for us, but especially for our users, but we managed to solve it in a way that made the users transparently migrate themselves as they were logging in to our system, never even knowing about the issue.

All in all, it was a great challenge and an important business goal for our customer, but also a great opportunity for code improvement, which we — as programmers — of course always love, too!

Don’t forget to follow us on Facebook, Twitter and LinkedIn!

Originally published at www.elements.nl on April 22, 2015.

--

--

Elements authors
Elements blog

A strategic design & innovation partner that moves brands forward.