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
Swipe sideways to see the whole chart →
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