Practice/Meta/Design i18n
Design i18n
Product DesignMust
Problem Statement
You need to design a content localization platform for a worldwide social media application with over 2 billion users across 150+ countries. The system must automatically translate the application's user interface elements (buttons, menus, error messages, tooltips, notifications) into 200+ languages while leaving user-generated content (posts, comments, messages) untranslated in their original language. The platform should support real-time updates when developers add new UI strings, handle regional dialect variations, support right-to-left languages, and maintain consistent translations across mobile apps, web interfaces, and API responses. Your solution must minimize latency for end users, support A/B testing of different translations, and provide tools for human translators to review and improve machine translations.
Key Requirements
Functional
- Multi-language UI rendering -- translate all interface elements into 200+ languages without touching user content
- Translation versioning -- support multiple translation versions for A/B testing and gradual rollouts
- Translation management workflow -- enable developers to add new strings and translators to review/approve translations
- Locale-specific formatting -- handle date formats, number formats, currency symbols, and text directionality per locale
- Fallback mechanism -- gracefully handle missing translations by falling back to default language
Non-Functional
- Scalability -- serve 500M+ daily active users with 50K requests per second at peak
- Reliability -- 99.99% uptime with no single point of failure
- Latency -- p99 latency under 50ms for translation lookups, CDN edge caching for static translations
- Consistency -- eventual consistency acceptable for translation updates, strong consistency for translation keys
What Interviewers Focus On
Based on real interview experiences, these are the areas interviewers probe most deeply:
1. Storage and Retrieval Architecture
The interviewer wants to understand how you'll store billions of translation strings efficiently and serve them with minimal latency to users worldwide.
Hints to consider:
- Consider key-value stores where keys are translation IDs and values are locale-specific strings
- Explore hierarchical fallback strategies (en-US → en → default) when specific translations are missing
- Think about how to version translations and switch between versions without downtime
- Discuss whether to embed translations in application bundles versus fetching them dynamically
2. Content Distribution Strategy
How will you ensure users in Tokyo, São Paulo, and Berlin all get fast access to their localized content?
Hints to consider:
- Evaluate CDN strategies for distributing translation bundles to edge locations
- Consider the tradeoff between bundle size and number of HTTP requests
- Think about invalidation strategies when translations are updated
- Discuss how mobile apps with offline capabilities should handle translations
3. Translation Workflow and Tooling
The interviewer expects you to design the developer and translator experience, not just the runtime system.
Hints to consider:
- Design an API or SDK that prevents developers from hardcoding strings
- Consider how to extract strings from code automatically and detect untranslated content
- Think about translation memory and consistency (the same English string should map to the same translation)
- Discuss how to handle pluralization rules that differ across languages (1 item vs 2 items vs many items)
4. Dynamic Content and Interpolation
How will your system handle UI strings with variables like "Welcome back, {username}!" or "You have {count} new messages"?
Hints to consider:
- Design a templating system that works across different language word orders
- Consider how to handle gender-specific translations where the variable affects surrounding words
- Think about security implications of client-side template interpolation
- Discuss how to validate that all variables in templates are properly supplied at runtime