Here in the Mobile Oxford team, we’ve been working with the team at Bangor University to help get the Molly Project, the open source project which grew from Mobile Oxford’s code base, ready to be translated into multiple languages (in Bangor’s case – Welsh!).
As Molly is a Django project, we can use Django’s extensive i18n framework to do most of the work for us, however, this does rely on us marking up the text for translation. When it comes to testing i18n, we needed a quick way of generating a test language file for us to drop in to check we’ve caught all of the strings that need to be translated.
Inspired by Richard Mitchell at Isotoma, who suggested using upside down English to test for Unicode bugs, we decided that testing i18n using upside-down English makes the most sense for us. And so, I wrote a script which did this. It ignores formatting strings and inside HTML, but everything else gets inverted using the lookup table defined at the top. We used this as we marked up each app in a feedback loop to make sure everything is marked up, and I think we got everything.
Data from external services (e.g., the library) isn’t translated, but where our data sources (e.g., the OpenStreetMap planet.osm dumps and the NaPTAN) do contain multi-lingual data, this is now imported into our database and tagged as the correct language, and where the data exists, it means you’ll see it in different languages!
We’ve no plans to launch multiple languages on Mobile Oxford at the moment, but this is perhaps something we can look at in the future – translating the site into multiple languages to make it more useful for tourists to the city!