Sandi Verdev

Case study

Taking a legacy, English-only UI to 15+ languages

FirstBeatMedia · Full Stack PHP Engineer · Feb – Dec 2013

Problem

The sites were built for English. Translations for new languages were coming in, but much of the UI couldn't use them: text was hard-coded in templates, baked into images ("No photo available", "Members only") or mixed with HTML inside translation strings.

Members who don't speak English also needed to find people who speak their language.

What I did

  • Moved hard-coded text to translation keys across the desktop and mobile layouts.
  • Replaced images with English text in them by text-free images with an HTML overlay, and per-language image sets where the text had to stay in the image.
  • Took HTML out of translation strings, so translators only see plain text with placeholders.
  • Made profile lists and search language-aware, built on the search I was rewriting at the time. A member who speaks Italian sees Italian-speaking members near them first; if there aren't enough, the search widens the distance step by step, then drops the country, and only if it still finds nobody does it fall back to English speakers.
  • Organized language assets so that adding a language means adding files, not code.
  • The team added the translations; my part was making the UI able to use them.

Result

Internationalization timeline, 2013February 2013: English text taken out of images. March: hard-coded UI text moved to translation keys and per-language images. April to June: language-aware profiles and search with a fallback. September to October: translation strings cleaned to plain text. November: language assets organized, final check and I18N switched on for a group of sites. December: Swedish, Finnish and Serbian.Feb 2013English text taken out of images:text-free images with HTML text on topMar 2013Hard-coded UI text moved totranslation keys; per-language image setsApr–JunLanguage-aware profiles and search,with a fallback for languages with few membersSep–OctTranslation strings cleaned up:plain text and placeholders, no HTMLNov 2013Language assets organized so a newlanguage means files, not codeNov 2013Final check, then I18N switched onfor a group of sites in productionDec 2013Images and checks for Swedish,Finnish and Serbian
2013, from the ticket history.

When I18N went live in November 2013, 13 of the 15 languages were at least 90% translated; all 15 were by mid-2014.

Stack

  • PHP
  • PHP templates
  • MySQL
  • Sphinx